ECSHOP安装或使用中提示Strict Standards: Non-static method cls_image:
随着ECSHOP的不断发展,越来越多的人成为了ECSHOP的忠实粉丝。由于每个人的服务器环境和配置都不完全相同,所以ECSHOP也接二连三的爆出了各种各样的错误信息。相信不少新手朋友在ECSHOP安装过程中都碰到过类似下面这样的错误提示吧。Strict Standards: Non-static method cls_image::gd_version() should not be called statically in /....../install/includes/lib_installer.php on line 31
注意: 省略号...... 代表的是ECSHOP安装路径,每个人的都不一样,所以这里用省略号代替了。
而且这种错误不只在安装过程中会出现,安装完后,在ECSHOP使用过程中,
在某些页面也会提示类似下面这样的错误信息,
Strict Standards: Non-static method cls_image::gd_version() should not be called statically in /....../includes/lib_base.php on line 346
这两种错误信息本质是一样的,只是发生在了不同的页面或不同的文件中,所以错误原因和解决方法也是一样的。
错误原因:
使用“::”符号调用PHP类中的方法(函数),其前提是该方法(函数)必须是使用static关键字定义的。
我们打开 include/cls_image.php文件,找到678行左右,
你会发现cls_image类中的函数gd_version() 是没有使用static关键字的,
所以在ECSHOP安装或使用中才会出现上面的错误提示。
解决方案:
知道了错误原因,再解决起来就容易多了。以下两种修改方法,任选其一即可。
第1种方法:
将gd_version()函数声明为静态函数。
打开 include/cls_image.php 文件,大概在678行左右,
将 function gd_version() 改成 static function gd_version() 就行了。
第1种方法很简单,推荐新手使用。
第2种方法:
先创建实例,然后再调用实例上的这些函数。
打开 install/includes/lib_installer.php 文件,定位到第31行左右,将
return cls_image::gd_version();
改为
| $cls_zuimoban_image = new cls_image(); return $cls_zuimoban_image->gd_version(); |
上面修改的是ECSHOP安装过程中出现的错误提示,
这个要在安装ECSHOP之前就修改好了哦,否则你是装不上的哦,
下面我们继续修改ECSHOP使用过程中的错误,修改方法同上,只是修改的文件不同而已。
继续打开 includes/lib_base.php 文件,找到第346行左右。
将
return cls_image::gd_version();
修改为
| $cls_zuimoban_image = new cls_image(); return $cls_zuimoban_image->gd_version(); |
ECSHOP安装或使用中提示Strict Standards: Non-static method cls_image:的更多相关文章
- 安装ECMall后报PHP Strict Standards错误,请问如何解决
Strict Standards: Non-static method ECMall::startup() should not be called statically in /htdocs/ecm ...
- 已解决:Strict Standards: Non-static method cls_image::gd_version() should not be called statically in...
在安装Ecshop的时候,遇到两个⚠️问题: Strict Standards: Non-static method cls_image::gd_version() should not be cal ...
- ECshop Strict Standards: Only variables should be passed by reference in解决办法
本文章来给各位同学介绍关于ECshop Strict Standards: Only variables should be passed by reference in解决办法,希望此教程 对各位同 ...
- PHP中Strict Standards错误解决方法二
在PHP5.3.3 中安装wordpress 3.0.1 ,在安装时出现错误:Strict Standards: PHP Strict Standards: Declaration of Walker ...
- ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法
今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...
- ECshop安装提示cls_image::gd_version() 和不支持JPEG
ecshop版本:ECShop_V2.7.3_UTF8_release1106php 版本 5.5--------------------------------------------------- ...
- 已解决:Strict Standards: Only variables should be passed by reference in
今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...
- ecshop安装常见问题及解决办法
一,Ecshop首页出现报错:Only variables should be passed by referen 最近想安装一个ECSHOP商城上去,老是报错,出现下面这就话: Strict Sta ...
- Ecshop安装过程中的的问题:cls_image::gd_version()和不支持JPEG
在安装Ecshop的时候,遇到两个问题: 1.Strict Standards: Non-static method cls_image::gd_version() should not be cal ...
随机推荐
- CSS表格固定列宽
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- ADS1.2 集成开发环境的使用
连风大神都没用过这个ADS1.2,什么破玩意儿啊,好像板子里面的资料也没有找到有这个软件,但是网上有滴,ADS1.2 集成开发环境的使用还是要会的,,, ARM ADS 全称为ARM Develope ...
- js 简易判断一个数字是否是小数
参考:js验证输入是否是小数 我的方法是: //check the number is decimal number function checkDecimal(number){ if(!isNaN( ...
- 纯CSS实现三列布局(两边固定,中间自适应)
看了一些网上的案例,感觉较繁杂,于是,自己整理了一篇来说明这个东西. 也是给我自己复习吧,以前有人问道,我还没答上来呢.== 看代码: html: <div class="top&qu ...
- MySQL 테이블 타입(Heap, MyIsam, InnoDB...) 변경하기
alter table 을 이용해서 기존의 생성된 테이블의 타입(Heap, MyIsam, InnoDB...)을 변경하는 명령어 입니다. 잠시 까먹은 분은 계실지 몰라도 원래 모르는 ...
- spark处理jsonFile
按照spark的说法,这里的jsonFile是特殊的文件: Note that the file that is offered as jsonFile is not a typical JSON f ...
- Oracle12c创建新用户提示公共用户名或角色无效
今天将备份的数据库还原到一台新的电脑上,首先要创建用户,执行如下语句: create user fxhy identified " default tablespace USERS temp ...
- 在C#中创建类型
重载构造函数: using System; public class Wine { public decimal Price; public int Year; public Wine (decima ...
- 使用repeater控件显示列表替代treeview
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- Podfile 文件的编写
# Uncomment this line to define a global platform for your projectplatform :ios, '9.0' target 'Cocoa ...