ID: 9282
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Unknown/Other Function
Assigned To:
Comments:
this is how windows (aka MS-DOS) works,
to write transparent binary to a file you have to
open it with mode "wb" instead of "w"
(unix will accept the 'b' too although it has no effect there)
Previous Comments:
---------------------------------------------------------------------------
[2001-02-15 10:36:48] [EMAIL PROTECTED]
look at the following code :
<?
$s = chr(0x0a);
print strlen($s);
$fp =fopen("test.txt","w");
fwrite($fp,$s,1);
fclose($fp);
?>
the output on screen is 1(strlen($s)) but in my file, i get always 0x0d 0x0a.
With Unix, i get only 0x0a in my file.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9282&edit=2
--
PHP Development 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]