$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 ($debug) { // Show the error.
echo '';
} else {
// Log the error:
// You could write the error to a file, very useful on a live site, or shoot them off in an email.
} // End of debug IF
} // End of my_error_handler() definition.
// Use my error handler:
set_error_handler('my_error_handler');