PHP include paths
Posted on 2004-12-01
More of a general one this. I've got a bunch of classes that I use day to day. I've been playing with one of them, and I have tried to include another file at the top of the class containing some configuration options.
My path is like this:
So, the index includes the class, and the class includes the config.inc.php.
However, am I right in thinking, that for the class to include the config.inc.php, it will start the path from where *it* was originally called? i.e if my class file simply has include('config.inc.php'); it will in fact try to call it in from the root directory, not where the class itself is stored?
What's the most flexible way around this?