xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>PHP 自定义错误处理函数 实例 - 自学教程(runoops.com)</title>
</head>
<body>
// 错误处理函数
function customError($errno, $errstr){
echo "<b>Error:</b> [$errno] $errstr";
}
// 设置错误处理函数
set_error_handler("customError");
// 触发错误
echo($test);
</body>
</html>