note 83832 deleted from reserved.variables.server by tularis
| From: | tularis@php.net | Date: | Sat, 14 Jun 2008 21:04:23 +0000 |
| Subject: | note 83832 deleted from reserved.variables.server by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-140434@lists.php.net to get a copy of this message | ||
Note Submitter: DG-Root at fluxbearinc dot net
Reason: useless
----
<?php if($_SERVER['REQUEST_URI']!='/'&&
ereg($_SERVER['REQUEST_URI'],$_SERVER['PHP_SELF'])){ header('Location: http://url.dom/');die('URI'); } ?>
I made a little function here that will keep people from accessing the file itself. This is useful
for me on my own site where it is heavily include dependant and certain information may be leaked if
the included file is accessed on it's own.