I have this as a system to switch pages on a website:
<?php
if (! isset($_GET['page']))
{
include('./index.php');
} else {
$page = $_GET['page'];
switch($page)
{
case 'home':
include('./news.php');
break;
case 'downloads':
include('./downloads.php');
break;
case 'music':
include('./music.php');
break;
case 'gallery':
include('./gallery.php');
break;
case 'support':
include('./support.php');
break;
case 'history':
include('./history.php');
break;
case 'privacy':
include('./privacy.php');
break;
case 'ucsig':
include('./ucsig.php');
break;
default:
include('./news.php');
break;
}
}
?>
However, when you go to something like http://www.mysite.com/index.php then it just says it cannot display the page, it doesnt display the default value. Is there a way to stop this or is it just something I have to put up with?
Question
Sir Topham Hatt
Hi!
I have this as a system to switch pages on a website:
However, when you go to something like http://www.mysite.com/index.php then it just says it cannot display the page, it doesnt display the default value. Is there a way to stop this or is it just something I have to put up with?
Cheers,
Peter
Link to comment
Share on other sites
4 answers to this question
Recommended Posts