
ok will do
edit:
didnt work
Last edited by Jack!; 15-09-2009 at 03:26 PM.
I can see that the error is still coming up, perhaps you have the permissions set incorrectly in the file? I'm sure it is going to the correct page, yet it is still saying it cannot open it. Do you know how to change permissions? Make sure they're set to 0644. Perhaps you have it so world can't read it or something.
my pages are in
/site/pages
my 404.php is in
/site
and
/site/pages
Edit: Scratch this.
Last edited by ThisNameWillDo!; 15-09-2009 at 03:38 PM.
but what about when the other pages load?
what im trying to say is, the code i currently have lets me load the pages, but it wont load home.php when you go onto the site
My pages are in /pages and they work fine i dont need to touch that big just where it is ment to load home
PHP Code:<?php
// File include by Blob off of HabboxForum
$config = array("default" => "home", // Default Page
"directory" => "pages/", // Directory where files are held (with trailing slash)
"restricted" => array( "index" ), // Restricted pages
"404" => "404.php" // Error Page (with trailing .php)
);
$page = ( ( $_GET["page"] ) === null ) ? $config["default"] : ( str_replace("/", "", ( ( ( in_array( $_GET["page"], $config["restricted"] ) ) !== false ) ? $config["default"] : $_GET["page"] ) ) );
( file_exists( $config["directory"] . $page . ".php" ) !== false ) ? include( $config["directory"] . $page . ".php" ) : include( $config["directory"] . $config["404"] );
?>
Want to hide these adverts? Register an account for free!