PHP 针对nginx 的异常 Exception异常和Error错误都需要捕捉
catth (Error $e)
直接上代码
try{
echo asdasdf('111'); //未定义的函数
throw new Exception('asdasd');
}catch (Exception $e){
echo $e->getMessage();
}catth (Error $e){
echo $e->getMessage();
}

浙公网安备 33010602011771号