最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
require,include和require_once,include_once 出现open_basedir错误
时间:2022-06-24 23:42:41 编辑:袖梨 来源:一聚教程网
只要使用require或include包含文件(不管是./xx.php还是xx.php)都是报下面的错误
Warning: include() [function.include]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/:/tmp/:/var/cache/) in /var/www/testdir.php on line 2
php 5.2.17听说 open_basedir 有所改动,查看发现原来php5.2.10中的php.ini是使用右斜杠
| 代码如下 | 复制代码 |
| open_basedir = "e:/web/;C:/WINDOWS/TEMP/;" | |
升级到5.2.17 就tmd一直报错,改成左斜杠就好了,这叫什么事,难怪很多程序都会手工处理一下斜杠问题,估计就为了应对这一出
| 代码如下 | 复制代码 |
|
open_basedir = "e:web;C:WINDOWSTEMP;" |
|
这样就解决了
如果不是php设置问题错误提示一般是 Warning: include() [function.include]: URL file-access is disabled in the server configuration
这个解决办法只要把包含路径调正常即可。
相关文章
- 三角洲云游戏网页版极速畅玩-三角洲云游戏一键秒玩入口 11-02
- Windows 11 如何永久禁用会自动重启的 SearchHost.exe? 11-02
- 漫蛙manwa2链接入口-漫蛙manwa2网页直达入口 11-02
- jm漫画天堂-禁漫成人隐藏入口 11-02
- AO3镜像站合集-10个实测可用AO3入口网址速存 11-02
- pixiv网页版手机入口-pixiv手机网页登录入口 11-02