PHP错误:Only variables should be passed by reference

WBOY
Release: 2016-06-20 13:02:43
Original
1024 people have browsed it

PHP错误:Only variables should be passed by reference

原因在于PHP5.3版本开始,array_shift不支持函数返回

$tag_sel = array_shift(explode(' ', $tag));
Copy after login

上述写法改成下面写法

$tag_tmp = (explode(' ', $tag));
$tag_sel = array_shift($tag_tmp);
//$tag_sel = array_shift(explode(' ', $tag));
Copy after login

 


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!