You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
450 B
14 lines
450 B
<?php
|
|
function error_handler($errno,$errstr,$errfile,$errline){
|
|
echo "errno".$errno.'<br>';
|
|
echo "errstr".$errstr.'<br>';
|
|
echo "errfile".$errfile.'<br>';
|
|
echo "errline".$errline.'<br>';
|
|
die("something error");
|
|
}
|
|
|
|
set_error_handler("error_handler");
|
|
|
|
//产生一个用户级别的error
|
|
trigger_error("this is a error") //当异常发生时,自动调用自定义函数error_handler
|
|
?>
|