Ok first let me start off by saying there are folders, here is the architecture:
..
[]admin
->[]includes
[]images
application.php
Ok here is my question. In application.php there is a universal class that is used by everything on the website to display images, template files, etc. But it won't work for some files because they are in different folders. A file in the includes folder wouldn't be able to access the images folder if the class was designed for a file in the admin folder. So i am wondering, is there a function or command that allows the path to always start from the index instead of where the respective file is located? I have tried $_SERVER['DOCUMENT_ROOT'] but that gives the absolute root and doesn't work. Thank you for your time!