um.. this is what i came up with.. and in a lot fewer lines of code too.
just put the files with the extension you specify in the same directory as this script and it should run fine
PHP Code:
<?php
//your extension
$ext = ".php";
switch ($page) {
//Content Pages
case $page:
$page = $page . $ext;
if (file_exists("$page")) {
include("$page");
} else {
include("default.php"); }
break; }
?>
Comment