note 62064 added to function.fwrite

From: Date: Sat, 18 Feb 2006 18:41:20 +0000
Subject: note 62064 added to function.fwrite
Groups: php.notes 
Request: Send a blank email to php-notes+get-103977@lists.php.net to get a copy of this message
For anyone who is getting literal '\\r\\n' characters come out in their txt file, the reason I was getting them is I was using single quotes for the string. So the backslashes were getting automatically escaped by PHP or something. You have to double-quote the string, ie: $str = "my text\\r\\n"; fwrite($file, $str); ---- Server IP: 85.116.0.130 Probable Submitter: 82.35.83.156 ---- Manual Page -- http://www.php.net/manual/en/function.fwrite.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+62064 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62064&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+62064&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#103977) next »