基本是这个错误
我的根目录文件结构
..
/conn/conn.php
/test.test.php
test.php有
include("/conn/conn.php") 这句话
Warning: include(./conn/conn.php) [function.include]: failed to open stream: No such file or directory inD:\Program Files (x86)\AppServ\www\html4\mobile\setting_skins_mobile.phpon line1
Warning : include() [ function.include ]: Failed opening './conn/conn.php' for inclusion (include_path='.;C:\php5\pear') in D:\Program Files (x86)\AppServ\www\html4\mobile\setting_skins_mobile.php on line 1
无记录!
解决方法
include("../conn/conn.php") 但是不能使用你的工程的文件夹名字代替".."
参考http://www.codingforums.com/showthread.php?t=170962
If you have gone up a level and are referencing items down a level in the directory structure you will need to let PHP know this, by preceeding your file paths with "../" Here is an example:
Assume you have the following files:
afile.php
and
directory/myfile.php
if you want directory/myfile.php to include afile.php you will need to do the following:
include('../afile.php');
include('./afile.php');