I'm wondering what the easiest way to do this is:
I have two directories on a Unix server with PHP files in them. One of the files which sits in the first directory needs to include a file that sits in the second directory. The directory structure is similar to this:
/www/folder1/
/www/folder2/
My question is how do I include a file from folder two using a file from folder one without using the absolute path of the file such as the following:
include("/www/folder2/file2.php");
The reason I'm asking this question is because I would like these scripts to function on any server, no matter the absolute path the two folders sit in. In HTML this was done with a simple "../". Is there something similar I can do with PHP, and if not, how can it be done with PHP?