我目前在PHP5.4上运行一个网站,在此之前,我在5.3.8上运行我的网站.不幸的是,PHP5.4结合了E_ALL
和E_STRICT
,这意味着我之前的error_reporting
设置现在不起作用.我之前的值是E_ALL & ~E_NOTICE & ~E_STRICT
,我应该一次启用一个值吗?
我有太多的错误,文件中包含太多代码,我无法修复.
我目前在PHP5.4上运行一个网站,在此之前,我在5.3.8上运行我的网站.不幸的是,PHP5.4结合了E_ALL
和E_STRICT
,这意味着我之前的error_reporting
设置现在不起作用.我之前的值是E_ALL & ~E_NOTICE & ~E_STRICT
,我应该一次启用一个值吗?
我有太多的错误,文件中包含太多代码,我无法修复.
正如 comments 者所说,best个选项是修复错误,但由于时间或知识有限,这并不总是可能的.在你的php中.零钱
error_reporting = E_ALL
到
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
If you don't have access 到 the php.ini, you can potentially put this in your .htaccess file:
php_value error_reporting 30711
这是E_ALL值(32767)和删除E_STRICT(2048)和E_NOTICE(8)值.
If you don't have access 到 the .htaccess file or it's not enabled, you'll probably need 到 put this at the 到p of the PHP section of any script that gets loaded from a browser call:
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
One of those should help you be able 到 use the software. The notices and strict stuff are indica到rs of problems or potential problems though and you may find some of the code is not working correctly in PHP 5.4.