topical media & game development
basic-php-09-snippet05.php / php
<?php
//create your error handler function
function handler(error_message,
error_line) {
switch (error_line of file " .
"error_message"");
break;
//warnings
case E_WARNING:
echo "<h1>Warning</h1>";
echo "A warning has occured at line error_file.<br>";
echo " Error message created was "string_variable = "Worx books are great!";
//try to use str_replace to replace Worx with Wrox
//this will generate an E_WARNING
//because of wrong parameter count
str_replace("Worx", "Wrox");
?>
(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.