<?php
$p = $_GET["page"];
if (strpos($p,"..")) {
die("Bad page request");
}
if (!$p) $p = "main";
$content_file=$_SERVER["DOCUMENT_ROOT"]."/".$p.".php";
if (!file_exists($content_file)) {
header("Location: {$_SERVER["PHP_SELF"]}");
exit();
}
$title = ($p) ? "$p - My Site!" : "Main page - My Site!";
include("header.php");
include($content_file);
include("footer.php");
?>
firefox error:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
when line 1 is: <html>
then I get the error:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/110mb/new/index.php:2) in /var/www/110mb/new/index.php on line 10