Notice: Undefined property: stdClass::$xxx in /Applications/xxx/xxx/xxx/xxx.php on line 35
Warning: Invalid argument supplied for foreach() in /Applications/xxx/xxx/xxx/xxx.php on line 35
上面類似這種的錯誤要如何能夠攔截呢?如果可以的話我想改成自己的解釋用戶看到也不會怪
2 回答

斯蒂芬大帝
TA贡献1827条经验 获得超8个赞
set_error_handler
,set_exception_handler
,register_shutdown_function
这三个方法,可以找各种框架看看他们的错误异常接管,也可以用whoops这种现成的类库。
- 2 回答
- 0 关注
- 336 浏览
添加回答
举报
0/150
提交
取消