【解决问题】解决PHP5.4环境下ECSHOP网站报错的方法

时间:2020-09-25  来源:PHP搭建环境  阅读:


运行Ecshop首页出现报错:出现下面这就话:

Strict Standards: Only variables should be passed by reference in D:\**\includes\cls_template.php on line 406 第406行:$tag_sel = array_shift(explode(‘ ‘, $tag));

解决办法 1 5.3 5.4以上版本的问题,应该也和配置有关 只要406行把这一句拆成两句就没有问题了

$tag_sel = array_shift(explode(" ", $tag));

改成:


$tag_arr = explode(" ", $tag);
$tag_sel = array_shift($tag_arr);

(实验过,绝对可行)因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值 解决办法 修改完了要记得清理缓存。

2、php5.4环境下安装ECshop出现includes/lib_base.php on line 346的解决方案。

将cls_image.php 中 function gd_version() 改成 static function gd_version() 即可。

3 网站后台验证码不显示PHP Strict Standards: Redefining already defined constructor for class captcha in D:\web\322\includes\cls_captcha.php on line 119

打开 includes/cls_captcha.php

找到下面这段代码


function __construct($folder = "", $width = 145, $height = 20)
{
$this->captcha($folder, $width, $height);
}

将它移到

function captcha($folder = "", $width = 145, $height = 20)

的上边。

【解决问题】解决PHP5.4环境下ECSHOP网站报错的方法

http://m.bbyears.com/shipin/100904.html

推荐访问:解决了 能解决
相关阅读 猜你喜欢
本类排行 本类最新