note 55479 rejected from function.fwrite by nlopess
| From: | nlopess@php.net | Date: | Thu, 04 Aug 2005 18:05:18 +0000 |
| Subject: | note 55479 rejected from function.fwrite by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93083@lists.php.net to get a copy of this message | ||
Note Submitter: mojo at baumfleisch dot de
----
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))
{
}