致命错误php [英] Fatal error php

查看:121
本文介绍了致命错误php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在PHP中发生致命错误时,是否有方法使代码继续(不退出)?
例如我得到一个超时致命错误,我想要什么时候跳过这个任务,并继续与他人。
在这种情况下,脚本退出。

Is there a way to make the code continue (not exit) when you get a fatal error in PHP? For example I get a timeout fatal error and I want whenever it happens to skip this task and the continue with others. In this case the script exits.

推荐答案

有一个黑客使用输出缓冲,让你记录某些致命的错误,但是在发生致命错误后,没有办法继续执行脚本 - 这就是致命的!

There is a hack using output buffering that will let you log certain fatal errors, but there's no way to continue a script after a fatal error occurs - that's what makes it fatal!

如果你的脚本超时,你可以使用 set_time_limit() 给予更多的时间执行。

If your script is timing out you can use set_time_limit() to give it more time to execute.

这篇关于致命错误php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆