#18922 [Opn->Ver]: \r & \n & file()

From: Date: Fri, 16 Aug 2002 00:05:26 +0000
Subject: #18922 [Opn->Ver]: \r & \n & file()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16962@lists.php.net to get a copy of this message
ID: 18922 Updated by: sniper@php.net Reported By: phpinfo@21cn.com -Status: Open +Status: Verified Bug Type: Filesystem function related Operating System: Windows 2k -PHP Version: 4.2.2 +PHP Version: 4.3.0-dev New Comment: Updated version, set to 'Verified'. (IIRC, this also happens with Macos files..? And there's a bug report about it too) Previous Comments: ------------------------------------------------------------------------ [2002-08-15 14:28:11] kalowsky@php.net Can reproduce in CVS ------------------------------------------------------------------------ [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

« previous php.bugs (#16962) next »