为什么 PHP 仍然显示错误?
最近升级到 PHP 5.3 导致我的页面上显示大量折旧错误。在 php.ini 中,我关闭了 display_errors 和 error_reporting = E_ALL ^ E_DEPRECATED,但错误仍然显示。有想法吗?
Recently upgrading to PHP 5.3 has resulted in a slew of depreciation errors being shown on my pages. In php.ini I have display_errors off and error_reporting = E_ALL ^ E_DEPRECATED, but the errors still show. Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的脚本可能会以不同的方式设置错误报告级别。最好在运行有问题的页面末尾:
它将为您提供 display_errors 的全局和本地值。它可能在某个时候被打开。
如果您确定它已重新打开,则需要找到它重新打开的位置并将其删除。在项目中搜索 ini_set() 可能会有所帮助。
Your script could be setting the error reporting level differently. Preferably at the end of the page that's having problems run:
It will give you the global, and local values for display_errors. It's likely been turned on at some point.
If you establish that it's being turned back on, you'll need to find where it's turned back on, and remove that. Searching for ini_set() within your project will probably help.
为了应用这种更改,您必须重新加载 apache。
In order to apply this sort of change, you have to reload apache.
重新启动 PHP 并执行如下脚本:
确认更改
restart PHP and execute script like this:
to confirm changes