Hello,

Yep, me again, with yet another php question.
Maybe I'm too tired to see the easy solution...

I open a file and write to it:
   $handle = fopen ($temp_file, 'a');
   fwrite($handle, $original_info);
   fclose ($handle);

Later I want to add to the above file:
   $handle = fopen ($temp_file, 'a');
   fwrite($handle, $new_info);
   fclose ($handle);

Here's what the file now looks like:
original info
original info
original info
original info
new infonew info

I'm trying to achieve:
original info
original info
original info
original info
new info
new info

It writes the very first piece of new info on a new line.  That is
good.  The second piece of new info gets written right at the exact end
of the file.  I've tried fwrite($handle, $new_info\n) but that creates
an error.  So does  fwrite($handle, $new_info\r);

How can I get the new info to go on its own line in the file?

Thanks,
Roger



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to