I\'m designing a relatively simple site for a friend. I would like to impliment php so that he can change his header/footer without having to go back through every file. P
the simpler, the better.
index.php
if (empty($_SERVER['QUERY_STRING'])) {
$name="index";
} else {
$name=basename($_SERVER['QUERY_STRING']);
}
$file="txt/".$name.".htm";
if (is_readable($file)) {
include 'header.php';
readfile($file);
} else {
header("HTTP/1.0 404 Not Found");
exit;
}
?>
header.php
Main page
About
Links
the actual static html pages stored in the txt
folder in the page
.htm format