have a file that is included in a required file. the problem that I am having is the included file work only if the user on pages that are located on the root directory of the site. but if te user branch out to a sub directory they I get the error
failed to open stream: No such file or directory
this is how I currently include the file with in the required file.
include('classes/browser_detection.php')
so I tried couple of thing which did not work
First:
include('/cms/classes/browser_detection.php')
second:
include( dirname(__DIR__) . '/classes/browser_detection.php')
both of those options did not work. How can I get it to work without having to include the class in every page individually where the main file is required?