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.
精彩评论