I don’t get it.
When trying to include files from different directories, i’m sure i must be missing something real simple.
Site structure is like this.

if i include("includes/header.php); from inside the /reports/top_sellers_report.php file, the call to the css file doesn’t work.
To make it work i must put ../styles/styles.css
But then, if i open “product_dtails.php from the root, it too includes the header, and then the css file won’t load and i need to remove the ../ to make it work.
I can’t win…
Am i missing something?
4 hours of searching online suggests i am!
Your problem is not really PHP-related. Just look at the URLs:
Depending on where you are on your site, the relative path to
styles.cssmight change, thus when you accesshttp://www.example.com/reports/you have to use../styles/styles.css, wheras inhttp://www.example.com/you have to usstyles/styles.css.Probably the easiest way to fix your problem is either by using the absolute URL like
http://www.example.com/styles/styles.cssor the base-path/styles/styles.cssinstead of../styles/styles.css. I recommend the latter.