All pastes #100886 Raw Edit

Stuff

public text v1 · immutable
#100886 ·published 2006-07-26 15:08 UTC
rendered paste body
                                        $fp = fopen($this->directory . $file, 'rb');

                                        fseek($fp, TYPE_BYTES);
                                        $tfile->typecode = fread($fp, TYPE_INCR);
                                        $tfile->typecode = ord($tfile->typecode);  //THIS IS AN 8-bit INT, this works
                                        print $tfile->typecode . "<br />";

                                        $tfile->xmin = fread($fp, BBOX_INCR); //THESE ARE THE FLOATING POINT VARS
                                        $tfile->xmax = fread($fp, BBOX_INCR);
                                        $tfile->ymin = (double)fread($fp, BBOX_INCR);  //Returns ZERO
                                        $tfile->ymax = (double)fread($fp, BBOX_INCR);
                                        $tfile->zmin = (double)fread($fp, BBOX_INCR);
                                        $tfile->zmax = (double)fread($fp, BBOX_INCR);
                                        $tfile->mmin = (double)fread($fp, BBOX_INCR);
                                        $tfile->mmax = (double)fread($fp, BBOX_INCR);
                                        echo $tfile->xmin . "<br />";
                                        echo $tfile->xmax . "<br />";
                                        fclose($fp);