【发布时间】:2011-12-12 12:03:05
【问题描述】:
我遇到了 set_include_path 的问题,我阅读了很多关于该问题的消息,但没有一个对我有用。 我在 Debian 上,我的根目录将设置为 /home/project/
所以我尝试了这 4 种不同的方法:
ini_set("include_path", '/home/project');
ini_set("include_path", '.:/home/project');
set_include_path('.:/home/project');
set_include_path('/home/project');
set_include_path(get_include_path().PATH_SEPARATOR.'/home/project');
但是没有一个有效...当我做 echo get_include_path();每次看起来都不错。
但第 4 种方法在我的计算机上与 WAMP 完美配合。
所有这些错误消息:
Warning: include(/config/config.php) [function.include]: failed to open stream: No such file or directory in /home/project/web/www.project.com/index.php on line 3
Warning: include() [function.include]: Failed opening '/config/config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:/home/project') in /home/project/web/www.project.com/index.php on line 3
【问题讨论】: