关闭 PHP 5.3 中已弃用的错误 [英] Turn off deprecated errors in PHP 5.3
本文介绍了关闭 PHP 5.3 中已弃用的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的服务器正在运行 PHP 5.3,我的 WordPress 安装向我吐出这些错误,导致我的 session_start() 中断.
My server is running PHP 5.3 and my WordPress install is spitting these errors out on me, causing my session_start() to break.
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
这很烦人,但我不想关闭屏幕错误报告.如何禁用这些烦人的已弃用警告?
This is annoying, but I do not want to turn off on screen error reporting. How do I disable these bothersome deprecated warnings?
我正在运行 WordPress 2.9.2.
I am running WordPress 2.9.2.
推荐答案
您可以通过调用以下函数在代码中完成.
You can do it in code by calling the following functions.
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
或
error_reporting(E_ALL ^ E_DEPRECATED);
这篇关于关闭 PHP 5.3 中已弃用的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文