I have a class that I built and in one function I need to include an external file that holds additional info for the function. The class is stored in its own file.
The problem is, is that the path is relative so if I call the class from index.php in the root directory it works, but if i call it from edit.php in the folder php off from the root directory it won't. Shouldn't the include be based from the class file? Is there any way to do this?
I know I could probably do the full path /var/www etc. but I'm planning on putting this all on a few sites and would prefer to have it machine/path independent.