note 86468 added to function.defined

From: Date: Tue, 21 Oct 2008 03:36:48 +0000
Subject: note 86468 added to function.defined
Groups: php.notes 
Request: Send a blank email to php-notes+get-145531@lists.php.net to get a copy of this message
Nice one, here's may addition: index.php: <?php // Main stuff here define('SITE_IN', 1); include "x.php"; ?> x.php: <?php if (!defined('SITE_IN') or !constant('SITE_IN')) die('Direct access not allowed!'); ?> A bit of extra protection, a bit paranoid yes, it's good to be :) ---- Server IP: 203.88.112.190 Probable Submitter: 121.223.0.172 ---- Manual Page -- http://www.php.net/manual/en/function.defined.php Edit -- https://master.php.net/note/edit/86468 Del: integrated -- https://master.php.net/note/delete/86468/integrated Del: useless -- https://master.php.net/note/delete/86468/useless Del: bad code -- https://master.php.net/note/delete/86468/bad+code Del: spam -- https://master.php.net/note/delete/86468/spam Del: non-english -- https://master.php.net/note/delete/86468/non-english Del: in docs -- https://master.php.net/note/delete/86468/in+docs Del: other reasons-- https://master.php.net/note/delete/86468 Reject -- https://master.php.net/note/reject/86468 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145531) next »