Re: .inc over .php

From: Date: Fri, 19 Apr 2002 15:16:37 +0000
Subject: Re: .inc over .php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93716@lists.php.net to get a copy of this message
On Friday 19 April 2002 15:58, Erik Price wrote: > On Friday, April 19, 2002, at 04:10 AM, Jacob Wyke wrote: > > Why use .inc as a file extenstion when you can use .php ?? > > What are the advantages/disadvantages to using .inc? > > Is one more secure? > > Which is faster? > > Which is consider a better pratice? > > It's just to help me organize which files I use as included files (.inc) > and which files are actual PHP scripts that can be requested with a URI > (.php). > > Also, I set an Apache directive to refuse requests for any file with the > .inc extension, so my database connection info, password, etc is > (theoretically) safe from being served directly. > > > Erik Those files should be placed outside DocumentRoot (if you control the server). Then set include_path in php.ini to include that dir, and you're done. No need to rely on apache for this. -- Meir Kriheli

« previous php.general (#93716) next »