note 41490 deleted from function.include by felipe
| From: | felipe@php.net | Date: | Mon, 10 Dec 2007 18:22:00 +0000 |
| Subject: | note 41490 deleted from function.include by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133273@lists.php.net to get a copy of this message | ||
Note Submitter: marco_ at voxpopuli-forum dot net
----
In addition to the redeye at cs-aktuell dot de note:
to make pseudo-frame in total security
example: http://www.yourdomain.com/index.php?page=news
<?php
/* verify the validity of GET var page
if not set, do a default case */
if(isset($HTTP_GET_VARS['page']))
{
$p = $HTTP_GET_VARS['page'];
}
else
{
$p = 'index';
}
switch($p)
{
case 'index':
require('welcome.php');
break;
case 'news':
require('news.php');
break;
case 'what you want':
require('the file you want');
break;
default:
exit('Wrong parameter for file inclusion');
}
?>
marco_