PHP4 调用缺少方法时没有错误

发布于 2024-08-29 03:02:55 字数 154 浏览 4 评论 0原文

我在编写一些 PHP4 代码时遇到了一个恼人的问题。我重命名了一个类的方法,但我忘记在调用它的地方重命名它。令人烦恼的是,由于没有触发错误,因此很难找出问题所在。该脚本只是中止,使网页部分呈现。这不会触发错误是正常的还是这里发生了一些奇怪的事情?如果这是正常的,有没有办法强制这种事情导致错误?

I have come across an annoying problem while writing some PHP4 code. I renamed the method of a class but I forgot to rename it where it was being called from. The annoying part is it was hard to track down where the problem was because no error was triggered. The script simply aborted leaving the web page partially rendered. Is it normal for this not to trigger an error or is there something wacky going on here? If this is normal is there a way to force this kind of thing to cause an error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

念﹏祤嫣 2024-09-05 03:02:55

尝试设置 error_reporting() 在脚本的顶部,如下所示:

error_reporting(E_ALL); // report all errors

Try setting the error_reporting() at the top of your script, like this:

error_reporting(E_ALL); // report all errors
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文