服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > php教程 > php教程 >

require,include和require_once,include_once 出现open_ba

时间:2016-02-29 22:21来源: 作者: 点击:
只要使用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/c

只要使用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

这个解决办法只要把包含路径调正常即可。

(责任编辑:最模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容