Deprecated: Assigning the return value of new by reference is deprecated in报错

出现了Deprecated: Assigning the return value of new by reference is deprecated in wwwroot\common.inc.php on line 23的错误。

看了下之后定位到common.inc.php的文件找到23行,因为我们现在php是5.3的原因,在php5.3之中可以直接用”=”

而之前因为在本地上测试都是5.3以下的php环境用的是”=&”符号。

在5.3版本之后已经不允许在程序中使用”=&”符号。如果你的网站出现了Deprecated: Assigning the return value of new by reference is deprecated in 错误,别着急,先定位到出错的文件,查找下是不是在程序中使用了”=&”,发现使用了”=&”符号,去掉‘&’符号之后程序运行正常。

posted on 2013-07-04 17:03  语辰  阅读(256)  评论(0编辑  收藏  举报