已解决:Strict Standards: Only variables should be passed by reference in

今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.xxxx.com\cls_template.php on line 418

解决办法:

打开cls_template.php文件中发现下面这段代码:

$tag_sel = array_shift(explode(‘ ‘, $tag));
忘记说了,我的PHP版本是5.4.19,PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递,所以这段代码中的explode就得移出来重新赋值了

$tagArr = explode(‘ ‘, $tag);
$tag_sel = array_shift($tagArr);
这样之后顶部的报错没掉了,左侧和底部的报错还需要去ecshop的后台点击清除缓存才能去除。

时间: 2024-08-06 20:04:21

已解决:Strict Standards: Only variables should be passed by reference in的相关文章

ECshop Strict Standards: Only variables should be passed by reference in解决办法

本文章来给各位同学介绍关于ECshop Strict Standards: Only variables should be passed by reference in解决办法,希望此教程 对各位同学有所帮助. 错误提示 Strict Standards: Only variables should be passed by reference in D:/wamp/ecshop/includes/cls_template.php on line 406 用软件打开406行是这句话$tag_s

ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法

今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.xxxx.com\cls_template.php on line 418 解决办法: 打开cls_template.php文件中发现下面这段代码: $tag_sel = array_shift(explode(' ', $tag));忘记说了,我的PHP版本是5.4.19,PHP5.3以上默认只能传

php报警:Strict Standards: Only variables should be passed by reference in

错误原因 因为end函数的原因. end函数: mixed end    ( array &$array   ) 你可以看到end的参数是一个引用(reference),而你只能把一个变量的引用作为一个参数传给函数,而你直接把explode('.',$name)作为参数传给end函数,所以才有这个提示. 你可以这样修改,先定义一个变量,然后把这个变量传给end函数 解决方案: 打开includes/lib_main.php 把代码一 改成 代码二 即可解决错误. 代码一 1 function g

php中出现Strict Standards: Only variables should be passed by reference in的解决方法

今天在练习一个小demo的时候,在localhost文件中出现了这样的notice,具体的原因和解决方法做如下分析. 题目:已知一个字符串如下,将其最后两项转换为数组. $week = "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday"; 主要的思路:1. 先使用explode()函数将字符串进行分割,因该函数的结果会返回一个数组,所以分割的部分会独立的存入该数组中.  2. 再使用array_splice(

php报错:Strict Standards: Only variables should be passed by reference in...

我的报错代码 DB::unDB($_result = null , $_db); 改成下面这种写法就不报错了.(和php版本有关系) $_result = null; DB::unDB($_result , $_db);

Ecshop提示Only variables should be passed by reference in错误

Ecshop是个坑爹货,为什么tiandi会说它是个坑爹货呢,请看一下下面的官方的运行环境推荐: 服务器端运行环境推荐·php版本5.0以上5.3以下的版本(推荐使用5.2系列版本)·Mysql版本5.0及以上·空间安装zend·空间支持文件锁功能·开启GD功能·Mysql函数支持mbstring.iconv.fsockopen看见了吧,PHP5.3以下的版本,还推荐使用5.2的,尼妹的,现在哪个虚拟机还敢用5.3以下的版本?还在用5.3以下的版本?看看tiandi用的2两个主机,衡天的和wop

MagicZoom bug-Strict Standards: Only variables should be assigned by reference Error

问题:zencart Strict standards: Only variables should be assigned by reference in  jscript_zen_magiczoomplus.php 将符号&去掉就可以了http://stackoverflow.com/questions/11777908/strict-standards-only-variables-should-be-assigned-by-reference-php-5-4 看手册第15章: 引用是什么

php Only variables can be passed by reference

最近做项目,发现了一个报错  Only variables can be passed by reference,  意思是"只有变量能通过'引用'" 就是在代码中 使用了一个方法,这个方法的参数值传址引用的例如php的 end方法 php官网的说法 (PHP 4, PHP 5) end - 将数组的内部指针指向最后一个单元 说明? mixed end ( array &$array ) end() 将 array 的内部指针移动到最后一个单元并返回其值. 参数? array

PHP报错Only variables should be passed by reference in的解决方法

这个问题多半是因为引用传递参数引起的,解决办法一是修改代码不使用引用传递. array_shift(explode(' ', $tag)); PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递. $tagArr = explode(' ', $tag); $tag_sel = array_shift($tagArr); 参考地址:https://www.jb51.net/article/121929.htm 原文地址:https://www.cnblogs.com/wanghaok