<?php
error_reporting(E_ERROR | E_PARSE);
$header = "header.php";
$footer = "footer.php";

$file = $_SERVER["DOCUMENT_ROOT"].$_SERVER["REQUEST_URI"];
$filei = $file;

readfile($header);
$file_exists="$filei";
($fp = fopen($file_exists, "r")) or die("<center><h1>User must create an index.php4 or html file!</h1></center>".readfile($footer));
if(!$fp){
    echo "<center><h1>User must create an index.php4 or html file!!</h1></center>";
}else{
  readfile($filei);
}

readfile($footer);
end;
?>