ecshopphp version wrong

王林
Release: 2023-02-27 11:58:01
Original
3191 people have browsed it

ecshopphp version wrong

解决方法一:

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

将下列:

$tag_sel = array_shift(explode(' ', $tag));
Copy after login

修改为:

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

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

解决办法二:

找到文件:include/cls_template.php

将以下代码:

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

修改成:

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

推荐教程:PHP视频教程

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

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!