note 55479 added to function.fwrite

From: Date: Thu, 04 Aug 2005 18:03:10 +0000
Subject: note 55479 added to function.fwrite
Groups: php.notes 
Request: Send a blank email to php-notes+get-93082@lists.php.net to get a copy of this message
I have a Problem with getting a line to end. Usualy I would use \r\n but when I use fwrite() but it wont work. It just writes \r\n in my textfile. what do I do wrong? $txtordner = "deck/";//folder $txtendung = ".txt";//ending $url = $txtordner .= $USRname .= $txtendung;//$USRname is the filename $file = file_exists($url); if($fp = fopen($url, "w+"))//I want to erase the content { for($i=0;$i <= $anzahl-1;$i++) { $ausgabe[$i] .= "/r/n"; fwrite($fp, $ausgabe[$i]); } } if(fclose($fp)) { } ---- Manual Page -- http://www.php.net/manual/en/function.fwrite.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55479 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55479&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55479&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55479&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55479&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55479&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55479&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55479&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93082) next »