编程那点事编程那点事

专注编程入门及提高
探究程序员职业规划之道!

ecshop安装出错:Strict Standards: Non-static method cls_image::gd_version() should not be called statically

具体的报错信息

Strict Standards: Non-static method cls_image::gd_version() should not be called statically in C:\develop\wamp\www\ecshop\install\includes\lib_installer.php on line 31

其主要原因是,最新版php语法更严格。比如类的静态方法,前面必须有static修饰,解决Non-static method cls_image::gd_version()的问题,有2种方法:1是降低php的版本;2就是修改代码

怎么降低php的版本我就不说了,可以参考这篇文章:WampServer安装多个php版本

按照提示,修改lib_installer.php第31行的代码

原来的代码是

return cls_image::gd_version(,2);

修改成以下即可

$p = new cls_image(,2);
return $p->gd_version(,2);


未经允许不得转载: 技术文章 » PHP编程 » ecshop安装出错:Strict Standards: Non-static method cls_image::gd_version() should not be called statically