Re: Including Functions; one file or many?

From: Date: Sat, 27 May 2006 19:23:35 +0000
Subject: Re: Including Functions; one file or many?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-237012@lists.php.net to get a copy of this message
2006/5/27, Jochem Maas <jochem@iamjochem.com>:
2. any include file that does contain code that runs on inclusion contains something like the following as the first line of code: if (!defined('MY_APP_IS_SETUP')) die('try http://'.$SERVER['SERVER_NAME'].'/'); An enhancement to this strategy could be using an error header to prevent
exposing the internal structure of your site: if (!defined('MY_APP_IS_SETUP')) { header("Status: 404 Not Found"); die; }

« previous php.general (#237012) next »