I am organizing the folder structure of the site in what I thought was a sensible manner, but I am running into some major folder path headaches. There must be some sort of path variables/environment vars that can be set somewhere to alleviate this.
As an example, I put all of the common stuff here (header, footer, css, images, etc):
example.com/common
If a file inside of the example.com folder calls header.php, it is simple:
<?php include "common/header.php"; ?>
If it is two levels deeper, using relative paths (yuck - please help) it is as follows:
<?php include "../../common/header.php"; ?>
I won't belabor the point, but this gets messy, and I am running into "path not found" issues with nested content.
I don't want to hard-code the absolute path (all the way back to root level) for one simple reason, the development is on my desktop (Ubuntu linux w/ apache 2.4) and the paths are different from the web server.
How do I set a global path variable in apache?