Asi esta bien el codigo?
<?
if($id == "") {
include("principal.php");
}
else {
if(file_exists("$id.php")) {
$id = htmlspecialchars(trim($_GET["id"]));
$id = string $pattern("<[^>]*>","",$id) ;
$id = string $pattern(".*//","",$id) ;
include("$id.php");
}
else {
include("error.php");
}
}
?>