php提示Call-time pass-by-reference has been deprecated错误
看到错误提示如下:
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 46
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 47
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 47
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 48
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 49
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 51
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 56
Warning: Call-time pass-by-reference has been deprecated in E:网站目录www目录a.php on line 56 //phprm.com
解决办法如下:
方法1:把php.ini的display_errors = on改成display_errors = off // (不显示错误)就不显示了,但是这种方法不是太好,只是不显示错误,其实错误还是存在的.
方法2:
1. 在PHP.ini中搜索关键字:allow_call_time_pass_reference 没有的自行建立。
2. 将 Off 改成 On ,Web Server重起就OK了~
allow_call_time_pass_reference = Off 变成 allow_call_time_pass_reference = On
顺便解释下allow_call_time_pass_reference这个参数的含义:是否启用在函数调用时强制参数被按照引用传递.
此方法已不被赞成并在 PHP/Zend 未来的版本中很可能不再支持,鼓励使用的方法是在函数定义中指定哪些参数应该用引用传递,鼓励大家尝试关闭此选项并确保脚本能够正常运行,以确保该脚本也能在未来的版本中运行,每次使用此特性都会收到一条警告,参数会被按值传递而不是按照引用传递.
在函数调用时通过引用传递参数是不推荐的,因为它影响到了代码的整洁,如果函数的参数没有声明作为引用传递,函数可以通过未写入文档的方法修改其参数,要避免其副作用,最好仅在函数声明时指定那个参数需要通过引用传递.
永久地址:
转载随意~请带上教程地址吧^^
上一篇: 小语法有关问题
推荐阅读
-
php提示Call-time pass-by-reference has been deprecated错误
-
php提示Call-time pass-by-reference has been deprecated错误
-
Fatal error: Call-time pass-by-reference has been removed,passbyreference_PHP教程
-
php提示Call-time pass-by-reference has been deprecated in的解决方法[已测]
-
将要喷php5的Call-time pass-by-reference has been removed
-
php提示Call-time pass-by-reference has been deprecated in的解决方法[已测]_php实例
-
php提示Call-time pass-by-reference has been deprecated in的解决方法_PHP教程
-
将要喷php5的Call-time pass-by-reference has been removed
-
PHP Fatal error: Call-time pass-by-reference has been remove
-
php错误提示:Call-time pass-by-reference has been deprecated