An error occurred in script '$e_file' on line $e_line: $e_message\n
";
// Add the date and time:
$message .= "Date/Time: " . date('n-j-Y H:i:s') . "\n
";
// Append $e_vars to the $message:
$message .= "
" . print_r ($e_vars, 1) . "
\n";
if (!LIVE) { // Development (print the error).
echo '' . $message . '
';
} else { // Don't show the error:
// Send an email to the admin:
mail(EMAIL, 'Site Error!', $message, 'From: ojashurst@hotmail.co.uk');
// Only print an error message if the error isn't a notice:
if ($e_number != E_NOTICE) {
echo 'A system error occurred. We apologize for the inconvenience.
';
}
} // End of !LIVE IF.
} // End of my_error_handler() definition.
// Use my error handler.
set_error_handler ('my_error_handler');
// ************ ERROR MANAGEMENT ************ //
// ****************************************** //
?>