Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-27-2003, 09:20 PM   PM User | #1
nick_a
New Coder

 
Join Date: Nov 2002
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
nick_a is an unknown quantity at this point
dynamic includes

Does anyone know of any tutorials that are similar to this one: http://www.hotscripts.com/Detailed/21358.html (the link to the actual tutorial doesnt work)
I tried searching but with no success. Thanks for any help.
-Nick
nick_a is offline   Reply With Quote
Old 10-27-2003, 09:25 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
PHP Code:
$pages = array();
$pages['start'] = 'a.php';
$pages['contact'] = 'b.php';
$pages['error'] = 'error.php';

if (isset(
$_GET['page']) && isset($pages[$_GET['page'])) {
require_once 
$pages[$_GET['page'];
} else {
require_once 
$pages['error'];

Call it like domain.tld/page=contact and there you go.
__________________
De gustibus non est disputandum.
mordred is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:20 PM.


Advertisement
Log in to turn off these ads.