|
this is another way to receive the url param
<? //index.php?pg=filename //.inc
if($_GET['pg']) {
if(file_exists($_GET['pg'].".inc")) {
require_once($_GET['pg'].".inc");
}else{
echo "Script not found";
}
}else{
echo "the default page to show";
}
?>
Sign up to add your own comment here!
Comments
|
|
| This is not a good idea. Even with the '.inc' append, you are not sanitizing your variables.. and by using require_once() instead of file(), malicious XSS is trivial. |
More comments: 1
|
|