php错误提示 open_basedir restriction in effect 解决
来源:互联网 发布:matlab 遍历矩阵 编辑:程序博客网 时间:2024/06/07 13:38
先来看配置文件
$cache = new Cache(43200,'D:/wwwroot/cache/tmp/anzhuo/');//参数1 秒,参数2内容
$page = intval(isset($_GET['page'])?$_GET['page']:1);
$key = 'anzhuo_data_4'.$page;
$values = $cache->display($key);
这个是生成缓存文件了,但是发现生成是提示
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../license.php) is not within the allowed path(s):
问题是出现在了PHP.INI上面了
原因是php.ini里设置了
open_basedir=/var/web/w0895/:/tmp:/usr/lib/php
这里加上相关的目录就可以了
解答:
其实open_basedir 这个是用来限制php的目录访问权限什么的,如果不在允许的范围内,php就不能访问。
这个 open_basedir 在 php.ini 里可以设定,也可以在 apache的httpd.conf 里面设定
例如:
php_admin_value open_basedir "D:/wwwroot/cache/tmp/anzhuo/"
再比如:
php_admin_value open_basedir =/var/web/w0895/:/tmp:/usr/lib/php
好了再重启apache问题解决了。
- php错误提示 open_basedir restriction in effect 解决
- php错误提示 open_basedir restriction in effect 解决
- 解决 php 报错 open_basedir restriction in effect
- open_basedir restriction in effect错误的解决办法
- open_basedir restriction in effect错误解决方法
- open_basedir restriction in effect
- open_basedir restriction in effect的错误及其解决办法
- Warning: file_exists(): open_basedir restriction in effect. File 错误的解决办法
- open_basedir restriction in effect的错误及其解决办法
- php 运行时 is not writable、open_basedir restriction in effect
- linux 下出现:open_basedir restriction in effect
- require(): open_basedir restriction in effect. File
- Warning: require(): open_basedir restriction in effect.
- Warning: require(): open_basedir restriction in effect.
- lnmp 环境执行yii项目出错 require(): open_basedir restriction in effect 错误
- PHPExcel中open_basedir restriction in effect的解决方法
- PHPExcel 出现open_basedir restriction in effect的解决办法
- Warning: require(): open_basedir restriction in effect. File(/home/framework/laravel/
- android中知道图片name时获取图片的简单方法
- 双向冒泡与奇偶冒泡
- MyReport报表引擎2.7.8.8发布
- UIApplicationMain的介绍
- UI基本三控件
- php错误提示 open_basedir restriction in effect 解决
- 大型网站架构系列:电商网站架构案例(2)
- 高通平台手机开发之LCD
- express搭建服务端框架
- Android 4.x耳机插拔检测实现方法
- 【深度学习介绍系列】——前言
- Android如何判断一个应用在运行
- PostgreSQL系统表和视图
- POJ 3264 Balanced Lineup (RMQ)