尽管错误报告被关闭,但PHP警告仍然存在

我刚刚开始在我正在研究的网站的前端和后端(使用Wordpress)收到一些警告.使用error_reporting(0)关闭错误报告;放在wp-config.php文件的开头.我试图将它放入主index.php文件中,但无济于事.

这些警告今天才开始出现,并且它们没有显示在网站的实时版本上,这是至少99%相同的代码,相同的数据库.

以下是错误(domain.com的替代域名):

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/virtual/domain.com/:/usr/share/php/) in /var/www/virtual/domain.com/htdocs/wp-includes/functions.php on line 2104

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/virtual/domain.com/:/usr/share/php/) in /var/www/virtual/domain.com/htdocs/wp-includes/functions.php on line 2095

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/virtual/domain.com/:/usr/share/php/) in /var/www/virtual/domain.com/htdocs/wp-includes/functions.php on line 2104

为什么我会收到这些消息?不应该error_reporting(0)关闭所有警告?

解决方法:

尝试:

ini_set("display_errors", "off");

但是,根据您的主机,您可能无法动态更改这样的设置.

相关文章

我们有时候在定制WORDPRESS主题的时候,由于菜单样式的要求我...
很多朋友在做wordpree主题制作的时候会经常遇到一个问题,那...
wordpress后台的模块很多,但并不是每个都经常用到。介绍几段...
从WordPress4.2版本开始,如果我们在MYSQL5.1版本数据中导出...
很多网友会遇到这样一个问题,就是WordPress网站上传图片、附...
对于经常要在文章中出现代码的IT相关博客,安装一个代码高亮...