Re: fwrite appends data to file but wont do a new line...?
| From: | Galkov Vladimir | Date: | Wed, 07 Nov 2001 05:37:30 +0000 |
| Subject: | Re: fwrite appends data to file but wont do a new line...? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73670@lists.php.net to get a copy of this message | ||
just add "\n" to end of every inserted string..... ;-)
"Timmy" <mattwire@swt.edu> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ:
news:20011107002350.40896.qmail@pb1.pair.com...
> I'm trying to add data to a txt file. I use:
>
> $thefile = fopen("URL", "r+");
> fwrite ($thefile, $inputed_data);
>
>
> it puts the new data at the top of the file like it should only problem is
> that it doesn't allow me to put it on a new line or insert a <return>
>
> so instead of:
>
> new line of text
> old line of text
>
> i get:
>
> new line of textold ling of text
>
> anyone know what to do?
> thanks.
> (student of computer science)
>
>