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

2023-05-16

今天需要将某个网站般去另一台服务器。设置好运行,显示一大堆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];


本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

随机推荐