ecshop初次安装问题

本文探讨了使用最新版PHP(PHP/5.4.16)时遇到的兼容性问题,包括类的静态方法调用规则、类继承与方法参数一致性要求,以及变量传递方式的变动。提供了相应的解决策略,并强调了遵循严格标准的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Strict standards: mktime(): You should be using the time() function instead

这个错误处理   把mktime更改为time即可



Strict standards: Non-static method cls_image::gd_version() should not be called statically in E:\SiteAll\zbphp.com\www\includes\lib_base.php on line346



这个错误的的处理是修改文件:E:\SiteAll\ZBPHP.COM\www\includes\cls_image.php 第693行,把

“function gd_version()” 改成“static function gd_version()” 即可。


Strict standards: Only variables should be passed by reference in E:\SiteAll\Zbphp.com\www\includes\lib_main.php on line 1360



发现最新版本的PHP(PHP/5.4.16),有很多兼容问题,总是有报错。其实原因是最新版的更严格。

发现有几个地方:

1)类的静态方法,前面必须有static修饰。不能直接写public function fName(),前面必须加上static,否则报错

2)类的继承extends,子类的方法,如果父类也有,那么必须参数一致,否则也会报错。Strict standards: Declaration of UrlPath::Goods() should be compatible with UrlBase::Goods($rs, $param = Array) in



补充:Strict standards: Only variables should be passed by reference in E:\SiteAll\ZBPHP.COM\www\includes\cls_template.php on line 418

将 $tag_sel = array_shift(explode(' ', $tag)); 修改为

[php]  view plain copy
  1. <span style="font-size:18px;">            $tag_sel = explode(' '$tag);  
  2.             $tag_sel = array_shift($tag_sel);</span>  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值