#23014 [Fbk->NoF]: Wrong output with funtion fwrite(), fputs()
| From: | sniper@php.net | Date: | Mon, 07 Apr 2003 23:43:27 +0000 |
| Subject: | #23014 [Fbk->NoF]: Wrong output with funtion fwrite(), fputs() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37312@lists.php.net to get a copy of this message | ||
ID: 23014
Updated by: sniper@php.net
Reported By: c dot ferrari at gmx dot net
-Status: Feedback
+Status: No Feedback
Bug Type: Filesystem function related
Operating System: Windows XP
PHP Version: 4.3.2RC1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-04-02 10:59:49] sniper@php.net
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
------------------------------------------------------------------------
[2003-04-02 04:35:28] c dot ferrari at gmx dot net
Since PHP version 4.3.1 an also in version 4.3.2RC1 I have found some
problems with the function fputs() fwrite().
If you write only one character the functinon write two!!
Example 1:
<?php
$fp=fopen("test.txt","w+");
fputs($fp, "*");
fclose($fp);
?>
Result:
With a Hexeditor you can see 2A 0A.
Example 2:
<?php
$fp=fopen("test.txt","w+");
fputs($fp, "**");
fclose($fp);
?>
Result:
With a Hexeditor you can see the correct result 2A 2A.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23014&edit=1