i8badhaggis
New member
I can't figure out for the life of me why this isn't working. Even something simple like the following is not working:
<?php
error_reporting( E_ERROR );
function handleError($errno, $errstr,$error_file,$error_line)
{
echo "<b>Error:</b> [$errno] $errstr - $error_file:$error_line";
echo "
";
echo "Terminating PHP Script";
die();
}
//set error handler
set_error_handler("handleError");
//trigger error
myFunction();
?>
why isn't this working?
I tried the following but that still didn't work:
<?php
error_reporting(E_ALL);
function handleError($errno, $errstr,$error_file,$error_line)
{
trigger_error("<strong>Error:</strong> [$errno] $errstr - $error_file:$error_line<br>Terminating PHP Script", E_ERROR);
}
//set error handler
set_error_handler("handleError");
//trigger error
myFunction();
var_dump("five");
?>
<?php
error_reporting( E_ERROR );
function handleError($errno, $errstr,$error_file,$error_line)
{
echo "<b>Error:</b> [$errno] $errstr - $error_file:$error_line";
echo "
";
echo "Terminating PHP Script";
die();
}
//set error handler
set_error_handler("handleError");
//trigger error
myFunction();
?>
why isn't this working?
I tried the following but that still didn't work:
<?php
error_reporting(E_ALL);
function handleError($errno, $errstr,$error_file,$error_line)
{
trigger_error("<strong>Error:</strong> [$errno] $errstr - $error_file:$error_line<br>Terminating PHP Script", E_ERROR);
}
//set error handler
set_error_handler("handleError");
//trigger error
myFunction();
var_dump("five");
?>