Home  >  Article  >  Backend Development  >  ecshopphp version wrong

ecshopphp version wrong

王林
王林Original
2019-10-19 11:01:473341browse

ecshopphp version wrong

解决方法一:

php 5.3以上版本的问题,和配置有关 只要418行把这一句拆成两句就没有问题了。

将下列:

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

修改为:

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

因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值

解决办法二:

找到文件:include/cls_template.php

将以下代码:

return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);

修改成:

return preg_replace_callback("/{([^\}\{\n]*)}/", function($r) { return $this->select($r[1]); }, $source

推荐教程:PHP视频教程

The above is the detailed content of ecshopphp version wrong. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn