首页 > 其他 > 详细

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

时间:2019-11-21 11:06:03      阅读:91      评论:0      收藏:0      [点我收藏+]

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

代码报错:

<br />
<b>Strict Standards</b>: Only variables should be passed by reference in <b>/xxxxx/xxxxApi.php</b> on line <b>41</b><br />
<br />
<br />
<b>Strict Standards</b>: Only variables should be passed by reference in <b>/xxxxx/xxxxApi.php</b> on line <b>41</b><br />
<br />
<br />
<b>Strict Standards</b>: Only variables should be passed by reference in <b>/xxxxx/xxxxApi.php</b> on line <b>41</b><br />
<br />

原因:

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

 

解决办法:


$tag_sel = array_shift(explode(‘ ‘, $tag));
修改为:
$tagArr = explode(‘ ‘, $tag); $tag_sel = array_shift($tagArr);
 

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

原文:https://www.cnblogs.com/wangkongming/p/11903985.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!