Re: Writing newlines in files
| From: | Richard Lynch | Date: | Sun, 23 Sep 2001 20:16:31 +0000 |
| Subject: | Re: Writing newlines in files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68451@lists.php.net to get a copy of this message | ||
> $FTP_FILE="d:\programme\serv-u\ServUDaemon.ini";
This needs \\ where you have \ to escape the \ -- If you altered your path
to be, say:
d:\new\test\reset.ini
You'd have control characters in your filename...
> $fp = fopen("$FTP_FILE", "a");
>
$data="\n\n[USER=$username|1]\nPassword=$pw\nHomeDir=d:\\nLoginMesFile=c:\wi
> ndows\profiles\flo\my
>
documents\msg.txt\nDiskQuota=1|301443514202|24963514202\nAccess1=D:\-=Upload
> s=-|RWLCP\nAccess2=D:\Moviez|RLP\nAccess3=D:\Music|RLP";
In some places you have \\ where you need it, in others not.
c:\windows\profiles\flo\my... for example, is bad.
> fwrite($fp,$data);
> fclose($fp);
>
> That's my code and i want to make newlines in the text file..the file is
> text//plain but instead of a newline there are some awesome letters..
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm