[PHP] Add lines to a text file

2002-12-11 Thread Antti
How can I add lines to a text file? I didn't find any function for this. Thanks, antti. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Add lines to a text file

2002-12-11 Thread Sean Burlington
Antti wrote: How can I add lines to a text file? I didn't find any function for this. Thanks, antti. just open it in the right mode if you just need to add to the end of the file without doing anything else with it first $fp = fopen (/home/rasmus/file.txt, a); 'a' - Open for writing

Re: [PHP] Add lines to a text file

2002-12-11 Thread Antti
Sean Burlington wrote: Antti wrote: How can I add lines to a text file? I didn't find any function for this. Thanks, antti. just open it in the right mode if you just need to add to the end of the file without doing anything else with it first $fp = fopen (/home/rasmus/file.txt, a);

Re: [PHP] Add lines to a text file

2002-12-11 Thread Kent Sandvik
On Wednesday, Dec 11, 2002, at 13:36 US/Pacific, Antti wrote: Thanks it works. I forgot to say that i need to add a new line to that file. Now it puts all the stuff at the same line. How do I make it to add lines? Use fputs with the string ending with a \n, as in: $xmlfp =