nexhunter
New Member
- Messages
- 239
- Reaction score
- 1
- Points
- 0
http://forumnerds.com/showthread.php?p=6
k im using that tutorial and it is working but does anyone know what i have to do so the script looks into a subdirectory for the files instead of where the index file is.
thks for the help.
*i've edited only where the main page and error is and the [id] so it uses id not page for the linking
k im using that tutorial and it is working but does anyone know what i have to do so the script looks into a subdirectory for the files instead of where the index file is.
PHP:
<?php
if(!isset($_GET['id'])) {
include "id/main.php";
}elseif(!file_exists($_GET['id'].".php")) { // this also takes you to the home page if the page you're looking for using the ?page= dosn't exist
include "id/error.php";
}else{ //if all goes well
include $_GET['id'].".php"; // include the page e.g if it was ?page=tutorials include tutorials.php
}
?>
thks for the help.
*i've edited only where the main page and error is and the [id] so it uses id not page for the linking