i have this script that when you click a link it opens the new html or txt file or whatever it is, into a table, the problem im having is that when you just go to www.domain.com/index.php it wont show, it come up sith page can not be displayed ro dns error but if i go as if i clicked the link like..
www.domain.com/index.php?page=test.html
here is the script...
echo"
<table border=1>
<tr>
<td width=100>
<a href=index.php?page=last.txt>Varsity</a>
<br>
<a href=index.php?page=lastjv.txt>JV</a>
<td>
";
if ($page == last.txt) {
include(safe($page));
}
else if ($page == lastjv.txt) {
include(safe($page));
} }
else
{
include("blank.txt");
}
function safe($page) {
if (!eregi("..",$page) AND !eregi(".",$page))
{
$page = getenv('DOCUMENT_ROOT') . "/baseball/$page";
return $page;
} else {print "<p>WARNING - You are not allowed access to this area.
</p>";
exit;
}
}
include(safe($page));
please help any help would be appreciated...
-BS