Posted By

shamrog12 on 07/09/06


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Fixe


PHP Text Log


 / Published in: PHP
 

  1. #This is the message that will be added to the text file"
  2. $linefeed ="\n\n\n-------\n\n\n" ;// Determines what separates each entry.
  3.  
  4. $fileloc ="d:\path\to\log.txt" ;// Absolute path to the text file
  5. $handle =fopen ($fileloc ,'a' ); // Use 'a' to add to the end of the file, 'w' for the beginning
  6. fputs ($handle ,$emailBody ); // The message variable is whatever you want to add
  7. fputs ($handle ,$linefeed ); // Adds the linefeed
  8. fclose ($handle ); // Closes the file

Report this snippet  

You need to login to post a comment.