Hi,
I can'r read binary file that contains '0x0' character. Reading process
stops after reading '0x0' character on windows version of PHP. On Linux it
does not.

That same code gives another result on windows then on linux. Why?
(Consider file text.txt is contaning '0x0' characters. I'm using PHP4 build
from Jun 22 2001.)

$filename = "text.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
echo $contents;
echo strlen($contents);
for($i=0;$i<strlen($contents);$i++)
{ echo "$i:".ord($contents[$i])."<br>"; }

Isn't it bug?

Thanks
Roland Divin



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to