note 24765 modified in function.include by philip
| From: | philip@php.net | Date: | Fri, 23 May 2003 04:55:42 +0000 |
| Subject: | note 24765 modified in function.include by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48860@lists.php.net to get a copy of this message | ||
[Editor's note: WARNING This code can be a big security hole, be sure to never trust user input
(in particular GET input), and always check it before using it in the manner described in this
contributed note. WARNING WARNING]
A very short and simplemethod do include a file is:
(Very nice with $_GET and $_POST)
if (!@include("$_GET[$var].php)) include("$another_file.php");
--was--
[Editor's note: This code can be a big security hole, be sure to never trust user input (in
particular GET input), and always check it before using it in the manner described in this
contributed note.]
A very short and simplemethod do include a file is:
(Very nice with $_GET and $_POST)
if (!@include("$_GET[$var].php)) include("$another_file.php");
- fekalius
http://www.php.net/manual/en/function.include.php