
You typo'd it I think...Just another methodPHP Code:<?php
$page = $_GET[ "page" ]; // Change this for whatever you want the word after "?" be. (EG, using "page" you will do "?page=blah").
$args = array( ".", "http", "www", "/", "\\" ); // This stops people from getting files in other directories.
$page = str_replace( $args, "", $page );
if( isset( $page ) && trim( $page ) != "" )
{
include( $page . '.php' );
{
elseif( !isset( $page ) && trim( $page ) == "" )
{
include( "main.php" ); // This is the page that will be shown if you don't specify to load another page.
}
else
{
include( "404.php" ); // This is the page that will be shown if the page specified to load doesn't exist.
}
?>
After include( $page . '.php' ); you put another opening bracket. Shouldn't it be a closing?
Yeah, thanks.
Fixed my post![]()
Want to hide these adverts? Register an account for free!