ID: 22497
User updated by: henrik dot gebauer at web dot de
Reported By: henrik dot gebauer at web dot de
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2000
-PHP Version: 4CVS-2003-03-01 (stable)
+PHP Version: 4CVS-2003-03-02 (stable)
New Comment:
The script produces the following output with the current CVS version:
\n\n\n\n\n\n01234567890123test89
This is the output I expect. I get it with PHP 4.3.0 and earlier
versions.
\n\n\n\n\n\n01234567890123456789test
Previous Comments:
------------------------------------------------------------------------
[2003-03-01 18:55:57] [EMAIL PROTECTED]
Please show us the output produced by the script, and also the output
that you expect the script to produce.
------------------------------------------------------------------------
[2003-03-01 16:20:56] henrik dot gebauer at web dot de
sorry, Netscape filled the summary with the wrong contents.
------------------------------------------------------------------------
[2003-03-01 16:07:52] henrik dot gebauer at web dot de
Note: The new line chars can be everywhere in the first string.
------------------------------------------------------------------------
[2003-03-01 16:06:20] henrik dot gebauer at web dot de
New line chars seem not to count any longer.
The following example writes 6 new lines in a file, then 20 chars.
'test' should be placed after the last '9' but it is placed after the
last '3' (6 characters earlier as there are 6 new line chars)
I didn't have the problem with earlier versions of PHP.
<?php
$fp = fopen('file.txt', 'w');
fwrite($fp,"\n\n\n\n\n\n01234567890123456789");
fwrite($fp, 'test');
fclose($fp);
readfile('file.txt');
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22497&edit=1