I'm trying to include a block of html with hrefs. What i want to be able to do is only maintain one include file. Current code is:
<?php include __DIR__ . "/../../../includes/footer.php"; ?>
This links fine except any hrefs in the footer.php file must be prefaced by ../../../
due to the location. This means that I would have to create multiple footer files with different hrefs.
To display folder structure(*indicates where includes of the same php file are needed):
ROOT
¦
+---includes
¦ ¦
¦ +---footer.php
¦
¦
+---main
¦ ¦
¦ +---maps
¦ ¦
¦ +---uk
¦ ¦
¦ +---map.php*
¦
+---gallery.php*
¦
+---assets
¦
+---icons
+
¦
+---facebook_1.png