Re: Include Files
| From: | Rasmus Lerdorf | Date: | Tue, 25 Jul 2000 15:34:09 +0000 |
| Subject: | Re: Include Files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8062@lists.php.net to get a copy of this message | ||
Using .inc is not a mistake. And you shouldn't just let people execute
them either. Either put them outside your document root so they have no
way of getting at them, or if you for some silly reason have to put them
in your document root, simply block access to them using:
<LocationMatch ".*\.inc$">
Order allow,deny
Deny from all
</LocationMatch>
in your httpd.conf file.
-Rasmus
On Tue, 25 Jul 2000, 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?
>
> -Jeff
>
>