/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function logErrorsErrorHandler($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_USER_ERROR: "<b>My ERROR</b> [$errno] $errstr<br />\n". " Fatal error on line $errline in file $errfile". ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n". "Aborting...<br />\n" ); break; case E_WARNING: case E_USER_WARNING: break; // case E_DEPRECATED: // case E_USER_DEPRECATED: case E_STRICT: break; case E_USER_NOTICE: break; default: break; } /* Don't execute PHP internal error handler */ return true; }