CODE
<?PHP
/*include("includes/".$id .".php");*/
if(!isset($_GET['id'])){
$page = "home";
}
else {
$id = $_GET['id'];
}
if(file_exists("includes/".$id .".php")){
include("includes/".$id .".php");
}
else {
/* Put your own error message or some other content.
Even a redirect to the main page would work */
}
?>
/*include("includes/".$id .".php");*/
if(!isset($_GET['id'])){
$page = "home";
}
else {
$id = $_GET['id'];
}
if(file_exists("includes/".$id .".php")){
include("includes/".$id .".php");
}
else {
/* Put your own error message or some other content.
Even a redirect to the main page would work */
}
?>
All that you need is to put this in one of your pages and make sure the page has a .php extension.
Then, make a folder name includes and within place the files, also with .php extentions, that you want
to serve up through this way.
discuss this topic to forum
