I have a site that uses sorta a template system. SORTA. The site is basically a bunch of tables put together for format purposes.
I achieve this by having a header.php and footer.php file in each page, that way the design stays the same, but the content can change.
<?php
INCLUDE("header.php");
?>
......content goese here.
<?php
INCLUDE("footer.php");
?>
But I have a problem -
The header file also contains included files. Now, if I have a file located in a directory, I use "../header.php". This presents a big problem though... The header.php file conatains a much needed file - which is included like this - "../includes/common.php" (the reason is that I want the include directory outside the www public directory. Now, the problem is that if the file is in a subdirectory and I use the "../header.php", the script breaks because of the file structure.
Does anyone have any suggestions as to how I can get this to work without having to make up different header.php files for each level?