topical media & game development
basic-php-09-snippet04.php / php
<?php
//create your error handler function
function handler(error_message,
error_line) {
echo "<h1>Page Error</h1>";
echo "Errors have occurred while executing this page. Contact the ";
echo "<a href=\"mailto:admin@yourdomain.com\">administrator</a> " .
"to report errors<br><br>";
echo "<b>Information Generated</b><br><br>";
echo "<b>Error Type:</b> error_message<br>";
echo "<b>Error Filename:</b> error_line";
}
//set the error handler to be used
set_error_handler("handler");
//set string with "Wrox" spelled wrong
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.