Need to read a double value from a binary file
| From: | Juan Carlos Gonzalez | Date: | Wed, 13 Nov 2002 06:52:46 +0000 |
| Subject: | Need to read a double value from a binary file | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16935@lists.php.net to get a copy of this message | ||
Hi all! I need to read 8 bytes from a binary file (shp file) and cast it to
its double value...
I'm having problems because PHP casts it automaticlly to a string using
fread; I can't find the function to cast it correctly, because floatval only
removes the non-numeric parts of the variable, but it doesn't cast it
completly...
I already did a little program in C++ and it casts it perfectly, but I can'
find the way to do it in php!
Any help will be appreciated!