我接触PHP 都是接触5.6版本的以前的版本没接触 求高手帮忙,

我的PHP 用5.3版本就不报错,

已改成5.6版本就开始报错说静态类不能使用, static public function(){ ....}

**Strict Standards: Non-static method cls_image::gd_version() should not be called statically in F:\WWW\weixin\includes\lib_base.php on line 276

Strict Standards: Non-static method cls_image::gd_version() should not be called statically in F:\WWW\weixin\includes\lib_base.php on line 276

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in F:\WWW\weixin\includes\cls_template.php on line 300


Strict Standards: Non-static method cls_image::gd_version() should not be called statically in F:\WWW\weixin\includes\lib_base.php on line 276**
登录后复制
登录后复制

回复内容:

我接触PHP 都是接触5.6版本的以前的版本没接触 求高手帮忙,

我的PHP 用5.3版本就不报错,

已改成5.6版本就开始报错说静态类不能使用, static public function(){ ....}

**Strict Standards: Non-static method cls_image::gd_version() should not be called statically in F:\WWW\weixin\includes\lib_base.php on line 276

Strict Standards: Non-static method cls_image::gd_version() should not be called statically in F:\WWW\weixin\includes\lib_base.php on line 276

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in F:\WWW\weixin\includes\cls_template.php on line 300


Strict Standards: Non-static method cls_image::gd_version() should not be called statically in F:\WWW\weixin\includes\lib_base.php on line 276**
登录后复制
登录后复制

php的语法变规范,变严谨了,所以以前不符合规范的代码就会给提示,这是好事,你要习惯。

ecshopcls_image库中gd_version不是一个静态方法

http://de2.php.net/manual/en/language.oop5.static.php

http://us2.php.net/manual/en/errorfunc.constants.php

08-26 00:40