On Thursday, February 14, 2002, at 04:40 PM, Michael Kimsal wrote:
> On that same topic, *why* do people name files with both .inc and
> .php? Your .inc file has PHP code in it, right? Why not just call it
> .php and
> spare the server reconfiguration. If knowing which files are "include"
> files (long time since I've made that distinction!) just prepend
> them with inc_ or put them all in an includes/ directory.
If you are including a file into another file with PHP's 'include()'
function, it doesn't matter what the extension is. You don't even need
an extension. Apache doesn't even see this as a separate file, it
thinks of it all as one big file with the name of whichever file is
doing the including.
Giving the .inc suffix is a nice way to keep your code organized. Also,
I keep my .incs in a separate directory.
Not to mention I have a directive in my server's conf file that
specifically prevents it from serving any file with the extension '.inc'.
Web Developer Temp
Media Lab, H.H. Brown
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php