note 83832 added to reserved.variables.server

From: Date: Fri, 13 Jun 2008 21:51:51 +0000
Subject: note 83832 added to reserved.variables.server
Groups: php.notes 
Request: Send a blank email to php-notes+get-140423@lists.php.net to get a copy of this message
<?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. ---- Server IP: 209.41.74.194 Probable Submitter: 71.98.224.3 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.server.php Edit -- https://master.php.net/note/edit/83832 Del: integrated -- https://master.php.net/note/delete/83832/integrated Del: useless -- https://master.php.net/note/delete/83832/useless Del: bad code -- https://master.php.net/note/delete/83832/bad+code Del: spam -- https://master.php.net/note/delete/83832/spam Del: non-english -- https://master.php.net/note/delete/83832/non-english Del: in docs -- https://master.php.net/note/delete/83832/in+docs Del: other reasons-- https://master.php.net/note/delete/83832 Reject -- https://master.php.net/note/reject/83832 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140423) next »