我遇到了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');
但没有一个…当我做回声get_include_path();每次看起来都不错.
但是第四种方法在我的计算机上与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