我目前在PHP5.4上运行一个网站,在此之前,我在5.3.8上运行我的网站.不幸的是,PHP5.4结合了E_ALLE_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.

Php相关问答推荐

PHP在将数组子集赋给变量时是否复制数组子集?

无法使用PHP DomDocument找到IMG元素

有条件的运费率基于购物车小计与WooPayments货币转换

输入手写CSV时在PHP中进行日期判断

如何隐藏x轴图表上的值

致命错误:无法使用简单的php博客重新声明spl_autoload_Register()

如何使用MS Graph PHP SDK V2下载文件

如何配置我的.env文件以在laravel的一个项目中连接两个不同的数据库?

防止同时从Laravel中的用户帐户中提取

从WooCommerce订单项目获取Dokan卖家详细信息

根据小计向 WooCommerce Checkout 添加佣金

当我激活插件时出现错误注意:未定义的偏移量:1

将Shopware 6后端中定义的值导入MultiFilter

php preg_match 验证 Tiktok 用户名

MySQLI bind_param导致的Cannot modify readonly property错误

docker |管道失败的 ubuntu 源列表

WooCommerce 按 ID 限制产品

在全局安装 Composer 包后运行命令

如何为多个表的id列设置不同的值

如何通过本地主机在同一台 PC 上同时运行 Microsoft IIS 和 WAMP