centOS下,已经设置了include_path, require_once失败
centOS下,使用yum安装的apache和php。在文档根目录下的index.php中调用了一个位于include_path中的文件。
通过浏览器访问index.php的时候,错误提示如下:
Warning: require_once(init/error_handler.inc.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/heroesweb/index.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'init/error_handler.inc.php' (include_path='/usr/share/pear:/usr/share/php:/home/kwen/heroesweb/src/php/shared:/home/kwen/heroesweb/src/php/shared/libs') in /var/www/html/heroesweb/index.php on line 2
但是,如果在shell中使用php index.php命令,则可正确包含。
找不到原因,请各位帮帮忙~~