default include_path value

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sij
Forum Newbie
Posts: 2
Joined: Mon Aug 23, 2010 8:32 pm

default include_path value

Post 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!
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: default include_path value

Post by yacahuma »

Did you check you phpinfo()?
eskio
Forum Commoner
Posts: 66
Joined: Tue Apr 01, 2008 1:00 am

Re: default include_path value

Post 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/';
Post Reply