Page 1 of 1

default include_path value

Posted: Mon Aug 23, 2010 8:46 pm
by sij
Hello forum, I am new here and also new to PHP.

I am coming across a situation in the Zend framework that I thought someone could shed some light on.

I simply cannot find the initial, default value of include_path.

Code: Select all

set_include_path(PS . MY_CONSTANT_DIR . PS . get_include_path());
Presumably the call to get_include_path returns the value of include_path as defined in php.ini. The trouble is, that file does not exist, and I cannot find that value being set anywhere else.

Is there a default value that this function call will return? Or are there system variables that I should be aware of?

Thanks!

Re: default include_path value

Posted: Sun Aug 29, 2010 7:31 pm
by yacahuma
Did you check you phpinfo()?

Re: default include_path value

Posted: Mon Aug 30, 2010 1:38 am
by eskio
Hi,
you can set the include path yourself:

Code: Select all

$include_root_path = $_SERVER['DOCUMENT_ROOT']; //  root directory 
$include_path = $include_root_path.'floder1/';
$include_path .= PATH_SEPARATOR.$include_root_path.'folder2/';
$include_path .= PATH_SEPARATOR.$include_root_path.'folder3/';