#18922 [Opn]: \r & \n & file()
| From: | kalowsky@php.net | Date: | Thu, 15 Aug 2002 18:28:11 +0000 |
| Subject: | #18922 [Opn]: \r & \n & file() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16925@lists.php.net to get a copy of this message | ||
ID: 18922
Updated by: kalowsky@php.net
Reported By: phpinfo@21cn.com
Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2k
PHP Version: 4.2.2
New Comment:
Can reproduce in CVS
Previous Comments:
------------------------------------------------------------------------
[2002-08-15 14:15:18] phpinfo@21cn.com
I found some boring things when i use file() fgetc()
all my test was based windows and i configed my php
with the 'apache module' way .
1.
First i create a file named 'file.txt' with the Editplus,
and i type some charactors like:
s
s
s
s
s
s
my script is :
<?
$data=file('file.txt');
$wtmsg=implode(NULL,$data);
$fp=fopen('file.txt','w');
fwrite($fp,$wtmsg);
fclose($fp);
?>
after i refresh the page sometimes
the 'file.txt' is like :
s
s
s
s
s
the function file() add a lot of \r before \n
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18922&edit=1