I'm looking to include other folders in my include path for PHP. I've seen this question:
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?
I think you are looking for this: set_include_path
With it, you can do:
set_include_path(get_include_path() . PATH_SEPARATOR . $otherpath);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With