在网上找了一个方法执行的时候提示Strict Standards: Only variables should be passed by reference in,接下来吾爱变成为大家介绍一下解决方法,有需要的小伙伴可以参考一下

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

1、错误提示:

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

2、错误原因:

PHP5.3以及PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递,当然也不是所有的PHP函数都不支持这种写法

3、解决方法:

    (1)、更改PHP版本到5.3以下

    (2)、更改写法,以下是我测试的实例代码

$dstimage = "itbiancheng.jpg";
$suffix = strtolower(array_pop(explode('.', $dstimage ) ) );
//改成以下代码
$arr = explode('.', $dstimage );
$suffix = strtolower(array_pop($arr));
var_dump($suffix);

4、运行截图如下:

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

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章