I need to search within the web site for a particular file and retrieve the relative path to the file so I can link to it within my php code. For example:
neededfile.php resides in the root directory of the web site
page1.php resides in /links/
page2.php resides in /orders/
page3.php resides in /functions/language/
I need to link to neededfile.php in all 3 pages, but they are in different locations at different folder depths.
Each page must look up the location of neededfile.php.
What is the best way to look up the relative path to neededfile.php so that the relative link can be created?