tags:

views:

197

answers:

1

I'm looking to include other folders in my include path for PHP. I've seen this question:

http://stackoverflow.com/questions/24622/setting-php-include-path-on-a-per-site-basis

BUT I don't want to replicate the system path (I suppose I could but then it won't update if the system path is updated). What I would rather is to simply have a line which looked like:

ini_set('include_path', ini_get('include_path').$otherpaths);

Will this work, and is there some fundamental readon this is bad?

+3  A: 

I think you are looking for this: set_include_path

With it, you can do:

set_include_path(get_include_path() . PATH_SEPARATOR . $otherpath);
Paolo Bergantino
Hah, oh, for a while there, I'm slackin'. This qualifies as so simple why not ask? That's why it's here! Good to see you.
altCognito