php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18922 \r & \n & file()
Submitted: 2002-08-15 14:15 UTC Modified: 2002-09-23 17:38 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: phpinfo at 21cn dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.3.0-dev OS: Windows 2k
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpinfo at 21cn dot com
New email:
PHP Version: OS:

 

 [2002-08-15 14:15 UTC] phpinfo at 21cn dot 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 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-15 14:28 UTC] kalowsky@php.net
Can reproduce in CVS
 [2002-08-15 20:05 UTC] sniper@php.net
Updated version, set to 'Verified'. (IIRC, this also happens with Macos files..? And there's a bug report about it too)


 [2002-09-23 17:38 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 05:01:31 2024 UTC