I recently just took my first hack at a mass mailer script and I have assigned cron to lynx my script every half hour...
the script source can be found here
I have never built an exhaustive error logging class or script.
I am not sure how to handle the errors that I might recieve when testing out my new mailing script. I don't want the browser to receive the errors, I would like to write them to a .txt file.
I've done some reading on the PHP manual regading 'error_log' and similar functions. I would rather not do this:
$get_mailing = mysql_query("SELECT * FROM newsletters_saved
WHERE status = 'incomplete' ORDER BY date_sent ASC LIMIT 1;")
or (error_log(date("D M j G:i:s T Y") . ": "
mysql_error(), 4, '/path/to/logs/errors.txt'));
in case the are other errors with the entire script..
Is there simple way to just tell php at the beginning of the script to write all errors to the error log file?
Thanks,
Phence