glitch1501
01-10-2006, 07:58 PM
I am trying to get php include working on this site I am working on, but I am having the strangest errors. The server has php3 on it..I wish we could upgrade, but it is a shared server, and they said we can't.
<?php
$ext = '.php';
$idx = $_GET["page"];
$idx = isset($idx) ? $idx.$ext : 'home'.$ext;
if(file_exists($idx))
{
include $idx;
}
else
{
echo 'The '.$_GET["page"].' page has not been implemented yet. ';
}
?>
The errors I am getting are,
Notice: Undefined index: page in d:\Customers\user*******\www\index.php on line 105
Notice: Undefined index: page in d:\Customers\user*******\www\index.php on line 113
The page has not been implemented yet.
and when i click on any link, it brings up the "this page has not been implemented yet" even though the files are there...
I did test it on my own server(php5), and it worked fine, Any input would be greatly appreciated.
glitch
<?php
$ext = '.php';
$idx = $_GET["page"];
$idx = isset($idx) ? $idx.$ext : 'home'.$ext;
if(file_exists($idx))
{
include $idx;
}
else
{
echo 'The '.$_GET["page"].' page has not been implemented yet. ';
}
?>
The errors I am getting are,
Notice: Undefined index: page in d:\Customers\user*******\www\index.php on line 105
Notice: Undefined index: page in d:\Customers\user*******\www\index.php on line 113
The page has not been implemented yet.
and when i click on any link, it brings up the "this page has not been implemented yet" even though the files are there...
I did test it on my own server(php5), and it worked fine, Any input would be greatly appreciated.
glitch