552reads

PHP Include directory change problemview story

I have a structure something like index.php (includes the header) includes/header.php (Includes the billing config file) billing/accounts/config.php caseStudies/example.php (includes the header) The problem now is that the case study file is including the header and then the billing config file is trying to be included within that page. However it can't find it because it would require to backtrack like ../billing/accounts/config.php but it isn't. However if I change the path to ../ then the config wont be included on pages within the root directory.

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.
CAPTCHA
Human?
Image CAPTCHA
Enter the characters shown in the image.