您现在的位置是:首页 > cms教程 > ecshop商城教程ecshop商城教程
ecshop适配PHP5.6的方法
千萍2025-01-17 20:44:08ecshop商城教程已有11人查阅
导读适配1:Strict standards: Non-static method cls_image::gd_version() should not be called statically in C:\wamp64\ \install\includes\lib_installer.php on line 31
适配1:
Strict standards: Non-static method cls_image::gd_version() should not be called statically in C:\wamp64\ \install\includes\lib_installer.php on line 31
找到include/cls_image.php中的678行,将function gd_version()改成static function gd_version()即可。
适配2:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in C:\wamp64\ \includes\cls_template.php on line 1071
原因:
preg_replace() 函数中用到的修饰符 /e 在 PHP5.5.x 中已经被弃用了。
如果你的PHP版本恰好是PHP5.5.X,那你的ECSHOP肯定就会报类似下面这样的错误:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in......
其实从刚才的错误提示信息中我们也能看出一二,它提示我们使用 preg_replace_callback 来代替 preg_replace。
解决方法:
使用记事本或其他PHP编辑软件(如:editplus)打开文件 includes/cls_template.php ,找到 替换为 问题解决。
注:如果你的ECSHOP中其他文件也报类似的 preg_replace错误,请参照上面方法解决之,解决思路和解决方法是一样的。
适配3:
Strict standards: Only variables should be passed by reference in C:\wamp64\ \includes\cls_template.php on line 422
原因:
我的PHP版本是5.6.25,PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递,所以这段代码中的explode就得移出来重新赋值了
解决方法:
把 替换为 适配4:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in C:\wamp64\ \includes\cls_template.php on line 1072
解决方法:
找到includes/cls_template.php第1072行左右,
将 替换为 适配5:
Strict Standards: Redefining already defined constructor for class alipay in /data/web/includes/modules/payment/alipay.PHP on line 85
解决方法:
找到alipay.php中的class alipay{……},
将 移到 之前。
主要集中在 upload/includes/cls_template.php 文件中:
1:line 300 :
原语句: 修改为: 2:line 495:原语句: 修改为: 3:line 554:原语句: 修改为:
Strict standards: Non-static method cls_image::gd_version() should not be called statically in C:\wamp64\ \install\includes\lib_installer.php on line 31
找到include/cls_image.php中的678行,将function gd_version()改成static function gd_version()即可。
适配2:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in C:\wamp64\ \includes\cls_template.php on line 1071
原因:
preg_replace() 函数中用到的修饰符 /e 在 PHP5.5.x 中已经被弃用了。
如果你的PHP版本恰好是PHP5.5.X,那你的ECSHOP肯定就会报类似下面这样的错误:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in......
其实从刚才的错误提示信息中我们也能看出一二,它提示我们使用 preg_replace_callback 来代替 preg_replace。
解决方法:
使用记事本或其他PHP编辑软件(如:editplus)打开文件 includes/cls_template.php ,找到 替换为 问题解决。
注:如果你的ECSHOP中其他文件也报类似的 preg_replace错误,请参照上面方法解决之,解决思路和解决方法是一样的。
适配3:
Strict standards: Only variables should be passed by reference in C:\wamp64\ \includes\cls_template.php on line 422
原因:
我的PHP版本是5.6.25,PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递,所以这段代码中的explode就得移出来重新赋值了
解决方法:
把 替换为 适配4:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in C:\wamp64\ \includes\cls_template.php on line 1072
解决方法:
找到includes/cls_template.php第1072行左右,
将 替换为 适配5:
Strict Standards: Redefining already defined constructor for class alipay in /data/web/includes/modules/payment/alipay.PHP on line 85
解决方法:
找到alipay.php中的class alipay{……},
将 移到 之前。
主要集中在 upload/includes/cls_template.php 文件中:
1:line 300 :
原语句: 修改为: 2:line 495:原语句: 修改为: 3:line 554:原语句: 修改为:
本文标签:
很赞哦! (1)
上一篇:ecshop二次开发修改问答
暂无内容 |
暂无内容 |
相关文章
暂无内容 |
暂无内容 |
随机图文
ecshop商品属性怎么仿淘宝选择功能
经常网友问商品的颜 尺 寸等属 选择,ecshop默认的是下拉菜单和点选两种形式,样式特别不耐看,淘宝选择那种方形的框选已经是主流ecshop限制或禁用缓存的实现方法
ECSHOP的缓存存放在templates/caches/文章夹下,时间长了这个文件夹就会非常庞大,拖慢网站速度。还有很多情况我们不需要他的缓存。本文介绍禁用ECSHOP缓存的方法。ecshop后台管理中心的标题信息怎么修改
今天一个客户要改“ECSHOP后台管理中心的Title信息”,以前还真没注意过这里。也许有人不清楚是哪里,下面以图片说明之。修改方法其实很简单的:ecshop添加新商品交易滚动显示功能的方法
ecshop添加新功能我感觉无外乎就是两个地方的修改,显示的要修改模板,为了方便下次升级,很好都做成lbi,下次升级了直接把lbi拷进去, 然后稍微修改一下dwt的模板就行了。
留言与评论 (共有 0 条评论) |