只要使用require或include包含文件(不管是./xx.php還是xx.php)都是報(bào)下面的錯(cuò)誤
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 有所改動(dòng),查看發(fā)現(xiàn)原來php5.2.10中的php.ini是使用右斜杠:open_basedir = "e:/web/;C:/WINDOWS/TEMP/;"
升級(jí)到5.2.17 就tmd一直報(bào)錯(cuò),改成左斜杠就好了,這叫什么事,難怪很多程序都會(huì)手工處理一下斜杠問題,估計(jì)就為了應(yīng)對(duì)這一出:open_basedir = "e:web;C:WINDOWSTEMP;"
這樣就解決了,如果不是php設(shè)置問題錯(cuò)誤提示一般是 Warning: include() [function.include]: URL file-access is disabled in the server configuration
這個(gè)解決辦法只要把包含路徑調(diào)正常即可。