php 环境require(): open_basedir restriction in effect 错误

Posted newmiracle宇宙

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 环境require(): open_basedir restriction in effect 错误相关的知识,希望对你有一定的参考价值。

php 环境require(): open_basedir restriction in effect 错误


错误日志显示,访问脚本不在 open_basedir的限定目录里面

 


解决方法
打开fastcgi.conf
设置如下
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/data/web/";
ps:/data/web改成项目路径 这样就没有限制了

以上是关于php 环境require(): open_basedir restriction in effect 错误的主要内容,如果未能解决你的问题,请参考以下文章

php包含(include/require)文件时的作用域

require_once(): Failed opening required '/var/www/config/config.php' (include_path='.:&#

php和NodeJs共存的开发环境

php里的require_once是啥意思

php 一个页面使用require两次以上就会出现问题

php中的路径问题