当前位置: 主机百科 » 资源 » 技术 » 正文

ECShop报错:Strict Standards: Only variables should be passed by reference in D:XXXincludescls_template.php on line 422的原因及解决办法

在PHP5.3以上版本安装并运行ECShop时,安装完毕后打开商城时,程序会报错:Strict Standards: Only variables should be passed by reference in D:phpStudyWWWpublicshopincludescls_template.php on line 422,出现这个错误的原因就是PHP版本过高,在PHP5.3以上版本中默认只能传递具体的变量,而不能通过函数返回值传递。

解决办法有两种:

1.降低PHP版本到5.3。

2.按照错误信息中的路径找到并打开cls_template.php文件,把 

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

改成:

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

然后删除程序根目录下tempcaches下所有的文件或者通过后台清除缓存,之后刷新页面即可。

未经允许不得转载:主机百科 » ECShop报错:Strict Standards: Only variables should be passed by reference in D:XXXincludescls_template.php on line 422的原因及解决办法

相关文章