关闭已弃用的错误php 5.3

我的服务器运行php 5.3和我的wordpress安装是吐出这些错误导致我的session_start()打破。

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 662

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 669

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 676

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 712

这是恼人,但我不想关闭屏幕错误报告。如何禁用这些麻烦的过时的警告?

我运行Wordpress 2.9.2。

你可以通过调用以下函数在代码中做到。

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

要么

error_reporting(E_ALL ^ E_DEPRECATED);
http://stackoverflow.com/questions/2803772/turn-off-deprecated-errors-php-5-3

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:关闭已弃用的错误php 5.3