Re: file_exists
| From: | Stut | Date: | Thu, 15 Nov 2007 00:20:52 +0000 |
| Subject: | Re: file_exists | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264533@lists.php.net to get a copy of this message | ||
Philip Thompson wrote:
I've run into similar problems where I *thought* I was looking in the
correct location... but I wasn't. Take this for example....
<?php // index.php?page=hello/hi
$page = $_GET['page'];
if (file_exists ("$page.php")) {
include ("$page.php");
}
?>
I really hope this is not a piece of production code. If it is then you might want to think very hard about what it's doing. If you still can't see a problem let me know!
-Stut
--
http://stut.net/