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

我的报错代码

DB::unDB($_result = null , $_db);

改成下面这种写法就不报错了。(和php版本有关系)

$_result = null;
DB::unDB($_result , $_db);
时间: 2024-08-26 18:18:26

php报错: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 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以上默认只能传

已解决: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以上默认只能传

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

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(

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

读取文件后缀名报错:Notice: Only variables should be passed by reference in

在写读取后缀名函数时遇到此通知错误: function getExt($fileName){ // $tmp = explode(".", $fileName); return strtolower(end(explode(".", $fileName))); } 解决方法:经过手册查询,因为end函数需要传入的参数是一个数组通过引用传递的,只有真正的变量才能以引用传递,所以必须传入一个真正的变量.修改后代码如下就没有此错误显示了. function getExt(