您的位置:首页 > 编程语言 > PHP开发

关于ECSHOP模板架设的服务器php版本过高报错的解决方法(二)

2017-01-10 11:51 537 查看
ECShop安装之后,在后台发现一个错误,这个错误提示的意思:mktime()方法不带参数被调用时,会被抛出一个报错提示。

ECShop安装之后,在后台发现一个错误提示:

Strict Standards: mktime(): You should be using the time() function instead in :\wamp\www\dqzhubao.com\shinamondadmin\sms_url.php on line 31

Strict standards: mktime(): You should be using the time() function instead in D:\wamp\www\dqzhubao.com\shinamondadmin\shop_config.php on line 33

这个错误提示的意思:mktime()方法不带参数被调用时,会被抛出一个报错提示。

找到文件第31行:

$auth = mktime();

将mktime()替换成time()方法,代码为:

$auth = time();

ECShop后台界面设置时候会出现一个错误 Notice: Constant IN_ECS already defined in D:\wamp\www\dqzhubao.com\shinamondadmin\editor\index_module_xn.php on line 3

找到文件打开发现define('IN_ECS',true);删除一个就可以解决当前这个问题了

Strict Standards: Non-static method cls_image::gd_version() should not be called statically in /web/agent/zuandingyisheng.com/includes/lib_base.php on line 349

原来的:

  return cls_image::gd_version();

修改为:

  $p = new cls_image();

  return $p->gd_version();

Strict Standards: Only variables should be passed by reference in /web/agent/zuandingyisheng.com/includes/cls_template.php on line 423

原来的:

  $tag_sel = array_shift(explode(' ',$tag));

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

Deprecated: preg_replace(): The /e modifier is deprecated,use preg_replace_callback instead in /web/agent/zuandingyisheng.com/includes/cls_template.php on line 555

原来的:

$val
= preg_replace(
"/\[([^\[\]]*)\]/eis"
,
"'.'.str_replace('$','\$','\\1')"
,
$val
);


修改为:

$val
= preg_replace_callback(
"/\[([^\[\]]*)\]/"
,
function
(
$r
) {
return
'.'
.
str_replace
(
'$'
,
'$'
,
$r
[1]);},
$val
);


当出现以下这两行错的时候,意思是报的是权限问题,把home这个文件的权限改成三个7试试(注:如果你的文件是其它名称你找到相对应的文件改就可以了,这只是一个缓存文件位置)

failed to open stream: No such file or directory in /home/username/public_html/includes/cls_template.php on line 262

Notice: can't write:/home/username/public_html/temp/compiled/page_header.lbi.php in /home/username/public_html/includes/cls_template.php on line 264

Deprecated: preg_replace(): The /e modifier is deprecated,use preg_replace_callback instead in /web/agent/zuandingyisheng.com/includes/cls_template.php on line 496

原来的:
$out = "<?php \n" . '$k = ' . preg_replace("/(\'\\$[^,]+)/e" ,"stripslashes(trim('\\1','\''));",var_export($t,true)) . ";\n";
修改为:
$out = "<?php \n" . '$k = ' . preg_replace_callback("/(\'\\$[^,]+)/" ,function($r) {return stripslashes(trim($r[1],'\''));},var_export($t,true)) . ";\n";
$out .= 'echo $this->_echash . $k[\'name\'] . \'|\' . serialize($k) . $this->_echash;' . "\n?>";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐