I want to have a basic templateish system where I can just specify ?p=<page> and it will include it, this is basically what I'm using now:
<?
if (!$_REQUEST['p']) {
$p = 'main';
} else {
$p = $_REQUEST['p'];
}
?>
----snip-----
<? require("$p.inc.php"); ?>
I'm worried that someone might be able to abuse it to include stuff that I don't want them to (by using .. or whatever, executing commands with ``). Is there a standard method used to secure scripts like that?
Thanks for your help.