首页 > 后端开发 > php教程 > php open_basedir

php open_basedir

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
发布: 2016-06-20 12:58:29
原创
1316 人浏览过

在Mac的VMware下面配置了个虚拟机,php的集成开发环境使用的是lnmp,配置了pangu系统的虚拟机,提示如下错误:

Warning: require(): open_basedir restriction in effect. File(/mnt/hgfs/php/api/config.inc.php) is not within the allowed path(s): (pangu/:/tmp/) in /mnt/hgfs/php/index.php on line 25 Warning: require(/mnt/hgfs/php/api/config.inc.php): failed to open stream: Operation not permitted in /mnt/hgfs/php/index.php on line 25 Fatal error: require(): Failed opening required './api/config.inc.php' (include_path='.:') in /mnt/hgfs/php/index.php on line 25
登录后复制

后来查Google发现是open_basedir会阻止打开不在open_basedir里面指定目录的文件,只要在php.ini配置open_basedir,把要引入的文件路径加入即可

------------------------------------------[HOST=www.lnmp.org]open_basedir=ls/:/tmp/[PATH=ls]open_basedir=ls/:/tmp/[HOST=128.com]open_basedir=/home/wwwroot/128.com/:/tmp/[PATH=/home/wwwroot/128.com]open_basedir=/home/wwwroot/128.com/:/tmp/:/mnt/hgfs/
登录后复制
相关标签:
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
php - Nginx 设置open_basedir跨站限制问题
来自于 1970-01-01 08:00:00
0
0
0
怎么学好php
来自于 1970-01-01 08:00:00
0
0
0
PHP扩展intl
来自于 1970-01-01 08:00:00
0
0
0
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板