PHP程序中以下代码:
$tag_sel = array_shift(explode(' ', $tag));
运行时有可能出现如下提示:
Strict Standards: Only variables should be passed by reference....
将 $tag_sel = array_shift(explode(' ', $tag)); 代码分开写,改为如下:
$tag_arr = explode(' ', $tag);
$tag_sel = array_shift($tag_arr);
再运行就应该不会出现上面的提示了。
本文详细介绍了在PHP程序中遇到变量引用错误时的解决方法,通过将代码拆分和重新组织,避免了错误提示的出现,确保了程序的正常运行。
647

被折叠的 条评论
为什么被折叠?



