我刚刚开始在我正在研究的网站的前端和后端(使用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");
但是,根据您的主机,您可能无法动态更改这样的设置.
原文地址:https://codeday.me/bug/20190901/1782112.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。