在网上找了一个方法执行的时候提示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的解决方法

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。