Re: Include Files

From: Date: Tue, 25 Jul 2000 14:28:00 +0000
Subject: Re: Include Files
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-8048@lists.php.net to get a copy of this message
Jeff Wilhelm wrote: > > I made the mistake of using the extension .inc as opposed to .php for my > include files, which means that the they can be viewed as text. If I'd named > them PHP they would never be sent without being executed, which means that > nobody would be able to see my code and passwords and all that. So, I simply > want to add .inc to the list of extensions that PHP will execute... how > would I go about doing this... I'm guessing I'd add a line to my httpd.conf > file or something... but what is the correct syntax? You can put this in your .htaccess files: AddType application/x-httpd-php3 .inc Rather than do that, it's nice to have the includes separated the way you did by naming them something different, like .inc. So to prevent people from downloading them at all, put this in your .htaccess: <Files *inc> Deny from all </Files> --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#8048) next »