| Sign In/My Account | View Cart |
| Article: |
Ten Security Checks for PHP, Part 1 | |
| Subject: | get/post | |
| Date: | 2003-03-24 07:37:27 | |
| From: | anonymous2 | |
| $HTTP_*_VARS are NOT obsolete. You need to use these for sites running versions of PHP prior to 4.1. | ||
Showing messages 1 through 3 of 3.
'^[a-z_]*$') or by using the realpath function to check that the resulting page is still in the desired directory.
$page = "path_to_file/$_GET[page].php";
// put de get variable in string, and indicated de directory where your subpages are
if (!file_exists($page)) {
$page = "index.php";
}
// if file not exists use the index.php
include($page);
// include de file
Note. Include all your subpages in path_to_file and your extension may be .php