开发者

php.ini include_path not working

I have changed "php.ini" to set include_path variable value as f开发者_C百科ollows: include_path = ".:/var/www/Projects/sunpath/www/_library"

but i have written require_once 'setup.inc.php' in the file abc.php which is in the path "/var/www/Projects/sunpath/www/abc.php" but while i am trying to access from browser using the path "http://hostname/Projects/sunpath/www/abc.php"

include_path works for abc.php but not for all the files in the project. what else i need to do. please help me.


$GLOBALS['CODE_ROOT'] = dirname(__FILE__);
require_once $GLOBALS['CODE_ROOT'] . '/setup.inc.php';

Try putting this in your abc.php providing that setup.inc.php is in the same directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜