Warning: require(): open_basedir restriction in effect.

php环境为lnmp一键安装包,php5.6。运行项目代码显示

Warning: require(): open_basedir restriction in effect. File(/mnt/hgfs/extraproject/yoga/simplewind/等信息

解决方案

修改
/usr/local/nginx/conf/fastcgi.conf


1
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";

此行注释,重启nginx即可。

如果再不生效,则将open_basedir设置为NULL

1
fastcgi_param PHP_ADMIN_VALUE "open_basedir=NULL";

重启nginx

坚持原创技术分享,您的支持将鼓励我继续创作!
0%