note 37474 added to function.define

From: Date: Sun, 16 Nov 2003 22:40:17 +0000
Subject: note 37474 added to function.define
Groups: php.notes 
Request: Send a blank email to php-notes+get-60466@lists.php.net to get a copy of this message
you can use the define feature as a handy security measure. On every file you concider an "entery point" put this at the begining of the file: define("SECURITY_KEY", true); Then in any file you want users to be unable to execute on their own, put this in the head: if (!defined("SECURITY_KEY") { Die(); } This should kill any attempt to open files without going through the right entery points. ---- Manual Page -- http://www.php.net/manual/en/function.define.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37474 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37474&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37474&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60466) next »