note 78594 added to function.fwrite

From: Date: Thu, 18 Oct 2007 14:42:53 +0000
Subject: note 78594 added to function.fwrite
Groups: php.notes 
Request: Send a blank email to php-notes+get-131503@lists.php.net to get a copy of this message
I have found that even putting \n and \r in singe vs. double quotes did not work for me. So I used the chr() function to convert the ascii decimal values to the characters (/r=13, /n=10): So instead of '\r\n' or "\r\n" on the Windows platform to get a new line I use: chr(13).chr(10) Using a example from a note below, instead of: if(fwrite($handle,$logMessage.'\r\n')===FALSE) use if(fwrite($handle,$logMessage.chr(13).chr(10))===FALSE) ---- Server IP: 66.207.199.35 Probable Submitter: 198.103.184.76 ---- Manual Page -- http://www.php.net/manual/en/function.fwrite.php Edit -- https://master.php.net/note/edit/78594 Del: integrated -- https://master.php.net/note/delete/78594/integrated Del: useless -- https://master.php.net/note/delete/78594/useless Del: bad code -- https://master.php.net/note/delete/78594/bad+code Del: spam -- https://master.php.net/note/delete/78594/spam Del: non-english -- https://master.php.net/note/delete/78594/non-english Del: in docs -- https://master.php.net/note/delete/78594/in+docs Del: other reasons-- https://master.php.net/note/delete/78594 Reject -- https://master.php.net/note/reject/78594 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131503) next »