Hello,

I changed the title of this email so it doesn't thread hijack...

I use a simple function like this to turn on and show warnings and errors. It's my understanding though, if the error is catastrophic, it will not be displayed on the screen no matter what you do. Not sure about that though...

I did not create this function, nor am I taking credit for it. I'm sharing it. I think it came from one of my many PHP books, possibly the PHP Cookbook...

<?php
function pc_error_handler($errno, $error, $file, $line, $context)
{
$message = "[ERROR][$errno][$error][$file:$line]";
print "<p>$message<br>";
?>
<p><a href="mailto:[EMAIL PROTECTED]<?php print $message; ?>">email this error</a>
<?php
print "</p>";
}


error_reporting(E_ALL);
set_error_handler('pc_error_handler');
?>

This will show the warning/error on the screen and provide a link for the viewer to use to report said error. You must replace "[EMAIL PROTECTED]" with your email address.

HTH,
Roger

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to