Home > Backend Development > PHP Tutorial > PHP Fatal error: Call-time pass-by-reference has been remove_PHP教程

PHP Fatal error: Call-time pass-by-reference has been remove_PHP教程

WBOY
Release: 2016-07-20 11:16:03
Original
1017 people have browsed it

意思是调用时引用传参已经被移除了,就是不能通过function(&$a)这种方式传参调用函数.<br /><br />解决方案:<br /><br />查看你的php.ini配置文件,把其中的 allow_call_time_pass_reference参数调整为true,并重启服务器试试。 <br /><br />======================================<br />此外,以前的php代码在升级到5.4版本的php可能会出现这种错误:<br /><br />当我们这样使用函数(或者类)的话,会产生一个error:<br /><br />foo(&$var);<br /><br />实际上,这样用本来就是错的,只是之前的错误级别仅仅是Deprecated而已。<br /><br />而正确的使用方法应该是在函数定义时:<br /><br />function foo(& $var) {<br />   //other code<br />}<br /><br />而在调用时直接传参就行了: foo($var);
Copy after login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440126.htmlTechArticleIt means that the reference parameter has been removed when calling, that is, it cannot be passed through function($a) Pass parameters to call the function. Solution: Check your php.ini configuration file and change allo...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template