#22904 [Opn->Fbk]: fwrite is not binary safe for '\0' string
| From: | iliaa@php.net | Date: | Wed, 26 Mar 2003 15:33:34 +0000 |
| Subject: | #22904 [Opn->Fbk]: fwrite is not binary safe for '\0' string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36500@lists.php.net to get a copy of this message | ||
ID: 22904
Updated by: iliaa@php.net
Reported By: momo@php.net
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: linux RH7.2
PHP Version: 4.3.2RC1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Cannot verify this bug with latest CVS. I think your editor just shows
\0 as ?
Previous Comments:
------------------------------------------------------------------------
[2003-03-26 09:25:48] momo@php.net
here is simple code:
----------------
<?
$f = fopen("test.txt","rb");
$buf= fread($f,4096);
$f2 = fopen("test2","wb");
fwrite($f2,$buf);
?>
---------------
where test.txt content is:
--------------test \0 test
--------------
the result test2 file is:
---------------
test ? test
---------------
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22904&edit=1