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 only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.

then use fwite to actually write to it



PHP General Mailing List (
To unsubscribe, visit:

Reply via email to