php5.3 中显示Deprecated: Assigning the return value of new by reference is deprecated in 的解决方法

来源:互联网 发布:东晋历史知乎 编辑:程序博客网 时间:2024/05/16 08:33
今天需要将某个网站般去另一台服务器。设置好运行,显示一大堆Deprecated。
Deprecated: Assigning the return value of new by reference is deprecated in。
新服务器与旧服务器环境是一样的,后来查看php版本,发现旧服务器是 PHP 5.2.4 新的是PHP 5.3.2。之前了解到5.3 与 5.3之前的区别较大,于是查看php文档。

在5.3版本之后已经不允许在程序中使用"=&"符号

如果出现了Deprecated: Assigning the return value of new by reference is deprecated in 错误,
先找到出错的文件,查找下是不是在程序中使用了"=&",如发现使用了"=&"符号,将 "=&" 改成 "=" 即可解决问题。

$link =& $this->links[$linkKey];// 改为$link = $this->links[$linkKey];


原创粉丝点击