在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下所有的文件或者通过后台清除缓存,之后刷新页面即可。