Re: Re: .html or.php extension

From: Date: Mon, 09 Feb 2004 17:27:54 +0000
Subject: Re: Re: .html or.php extension
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-177152@lists.php.net to get a copy of this message
Paul Furman wrote:
If you start with one index.php then use that to include additional files, it should accept any file, even with no extension. At least it works that way for me.
Just be careful with that. Remember that the files can be requested on their own, also. If you have "database.inc" that you include to connect ot your database and someone requests it by itself, they'll see your PHP code as plain text. Either store your includes outside of the web root, deny access to them, or give them a .php extension. Even if you give it a .php extension to hide the code, remember the file can be requested on it's own and run out of context, still. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#177152) next »