php Only variables can be passed by reference
最近做项目,发现了一个报错 Only variables can be passed by reference, 意思是“只有变量能通过‘引用’”
就是在代码中 使用了一个方法,这个方法的参数值传址引用的例如php的 end方法
php官网的说法
(PHP 4, PHP 5)
end — 将数组的内部指针指向最后一个单元
参数¶
array-
这个数组。 该数组是通过引用传递的,因为它会被这个函数修改。 这意味着你必须传入一个真正的变量,而不是函数返回的数组,因为只有真正的变量才能以引用传递。
返回值¶
返回最后一个元素的值,或者如果是空数组则返回 FALSE。
错误的使用:
end( explode(".", $file_name) )
正确的使用
$file_extend = explode(".", $file_name);
end($file_extend);
原文地址:php Only variables can be passed by reference
标签:php reference variables end
智能推荐
- 【实战】Docker 入门实战一:安装Dockeer
- Nginx return 关键字配置小技巧
- php 请求参数限制
- 【No.5 Ionic】修改 应用名,icon,启动界面
- 完美解决failed to open stream: HTTP request failed!(file_get_contents引起的)
php Only variables can be passed by reference的更多相关文章
- 已解决:Strict Standards: Only variables should be passed by reference in
今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...
- Strict Standards: Only variables should be passed by reference
<?php $tag="1 2 3 4 5 6 7"; $tag_sel = array_shift(explode(' ', $tag)); print_r($tag_se ...
- ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法
今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...
- ECshop Strict Standards: Only variables should be passed by reference in解决办法
本文章来给各位同学介绍关于ECshop Strict Standards: Only variables should be passed by reference in解决办法,希望此教程 对各位同 ...
- [php-error-report]PHP Strict Standards: Only variables should be passed by reference
// 报错代码:PHP Strict Standards: Only variables should be passed by reference $arr_userInfo['im_nation_ ...
- Ecshop提示Only variables should be passed by reference in错误
Ecshop是个坑爹货,为什么tiandi会说它是个坑爹货呢,请看一下下面的官方的运行环境推荐: 服务器端运行环境推荐·php版本5.0以上5.3以下的版本(推荐使用5.2系列版本)·Mysql版本5 ...
- 出现Strict Standards: Only variables should be passed by reference in的解决方法
出现Strict Standards: Only variables should be passed by reference in的解决方法 代码报错: <br /><b> ...
- php报警:Strict Standards: Only variables should be passed by reference in
错误原因 因为end函数的原因. end函数: mixed end ( array &$array ) 你可以看到end的参数是一个引用(reference),而你只能把一个变量的引 ...
- Only variables should be passed by reference
报错位置代码: $status->type = array_pop(explode('\\',$status->type)) (此处$status->type值原本是 APP\ ...
随机推荐
- window下JBoss7 安装部署
0x01 下载安装 1.下载地址: http://www.jboss.org/jbossas/downloads 2.解压缩:选择一个安装目录解压 jboss-as-7.1.1.Final.zip 3 ...
- linux共享内存的查看与删除
在使用共享内存的程序异常退出时,由于没有释放掉共享内存,在调试时会出现错误.您可以使用shell命令来查看与释放已经分配的共享内存,下面将详细说明如何进行查看和释放分配的共享内存的方法. 预备知识 L ...
- Kafka 0.11版本新功能介绍 —— 空消费组延时rebalance
在0.11之前的版本中,多个consumer实例加入到一个空消费组将导致多次的rebalance,这是由于每个consumer instance启动的时间不可控,很有可能超出coordinator确定 ...
- linux 开机自启
cd /home/dpf 1.vi startup.sh #!/bin/shecho "hello world" >> /home/dpf/test.txt vi mq ...
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration的解决
导入了一个工程,编译什么的都还好,但是报了一个XML的错误. cvc-complex-type.2.4.c: The matching wildcard is strict, but no decla ...
- CSS-禁用a标签
<style> a.disabled { pointer-events: none; filter: alpha(opacity=50); /*IE滤镜,透明度50%*/ -moz-opa ...
- Window 命令行神器:cmder
http://cmder.net/ https://github.com/cmderdev/cmder/releases/ 官网下载地址 http://www.360doc.com/content ...
- [原]F5负载均衡示例:轮寻
/** * lihaibo 欢迎转载,请保留原地址 */ 规划: F5 1600 BIG-IP 内网 192.168.100.0 255.255.255.0 外网 10.50.20.0 255.255 ...
- 跟bWAPP学WEB安全(PHP代码)--SSL(Server-Side-Include)漏洞
什么是Server-Side-Include漏洞 服务端包含漏洞是指发送指令到服务器,服务器会将指令运行完,把运行结果包含在返回文件中发送给你.利用这种漏洞可以获取服务端的信息甚至执行命令,这样的指令 ...
- Egret IDE中搜索,过滤文件,只搜索.ts
刚开始忘了这个搜索条件在哪里打开了,后来找着了,记录一下 = =!