On Sun, 28 Apr 2002, Rodrigo wrote:
> I still need to know how to do it, since the "a+" or the "a" give me
> problems...

What kind of problems? Do you get an error message that you can paste into
a message for us to see? Does the file get corrupted in some specific way
that you can describe? Does your computer start on fire?

> I need to be able to add a line at the end of a text file thru sending
> the information (and by this I mean the e-mail to be writen) thru a
> form, and this new information should be added to the file at the end of
> it without overwriting it.
>  
> PS: If possible send a code for instruction. ;)

<?

  $file_pointer = fopen('/tmp/myfile', 'a') || exit;
  $string_to_write = date('j-M-Y H:i:s') . "\n";
  fwrite($file_pointer, $string_to_write);
  fclose($file_pointer);

?>

miguel


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

Reply via email to