PHP报错Only variables should be passed by reference in的解决方法
Posted CIBLE
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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
以上是关于PHP报错Only variables should be passed by reference in的解决方法的主要内容,如果未能解决你的问题,请参考以下文章
php5.6 CI的问题(Only variable references should be returned by reference)
php中出现Strict Standards: Only variables should be passed by reference in的解决方法
已解决:Strict Standards: Only variables should be passed by reference in
Ecshop提示Only variables should be passed by reference in错误
Only variables should be assigned by reference
MagicZoom bug-Strict Standards: Only variables should be assigned by reference Error