Re: binary file + fread
| From: | Michael Agbaglo | Date: | Sun, 27 Jan 2002 17:27:38 +0000 |
| Subject: | Re: binary file + fread | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82296@lists.php.net to get a copy of this message | ||
[...]
$fd = fopen( $filename, "rb" ); //Notice the "b" $a = fread( $fd, 4 ); $b = fread( $fd, 4 ); printf( "a= %lx b=%lx", $a, $b); fclose( $fd ); ?> notice the "b" in the fopen, it stand for binary. [...]I noticed the 'b' like in but - it's also mentioned in the documentation, BUT it doesn't seem to work !