this is my error handler (well, the standard one). It's multi-purpose, easy to understand, and to change from occurance to occurance only requires changes in three or so variables.
'DEVELOPMENT', 'email' => 'CaptSushekECF@aol.com', 'log' => 'error_log.html'); // Set status to either "DEVELOPMENT" or "LIVE", any other variables will not work properly; set email to the email address errors will be logged to during LIVE mode; set log to the location errors will be logged. if (isset($err_h['status']) && isset($err_h['email']) && isset($err_h['log'])) { if ($err_h['status'] == 'LIVE') { $reporting = 0; $err = array (1 => $err_h['email'], 3 => $err_h['log']); } elseif ($err_h['status'] == 'DEVELOPMENT') { $reporting = 2047; $err = array (3 => $err_h['log']); } else { if (!headers_sent()) { echo 'Error in configuration file.There is an error within the configuaration file, this script has been halted.'; exit(); } else { 'There is an error within the configuration file, this script has been halted.
There is an error within the configuaration file, this script has been halted.
There is an error within the configuration file, this script has been halted.