RE: [PHP] fwrite appends data to file but wont do a new line...?
| From: | Martin Towell | Date: | Wed, 07 Nov 2001 00:32:39 +0000 |
| Subject: | RE: [PHP] fwrite appends data to file but wont do a new line...? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73661@lists.php.net to get a copy of this message | ||
I guess the easiest way is to do:
fwrite ($thefile, $inputed_data."\n");
-----Original Message-----
From: Timmy [mailto:mattwire@swt.edu]
Sent: Wednesday, November 07, 2001 11:33 AM
To: php-general@lists.php.net
Subject: [PHP] fwrite appends data to file but wont do a new line...?
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)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net