Page 1 of 1
.inc files
Posted: Wed May 25, 2005 5:01 am
by Skittlewidth
Quick question: What is the advantage of naming include files "file.inc" or "file.inc.php" over "file.php"? With a simple .inc extension the code can be read in a browser, so I can see the need for the .php, but then why include .inc at all? Is it just so developers can see at a glance which files are their include files?
Just curious

Re: .inc files
Posted: Wed May 25, 2005 5:03 am
by JayBird
Skittlewidth wrote:Quick question: What is the advantage of naming include files "file.inc" or "file.inc.php" over "file.php"? With a simple .inc extension the code can be read in a browser, so I can see the need for the .php, but then why include .inc at all? Is it just so developers can see at a glance which files are their include files?
Just curious

Using .inc on its own is bad, unless your server is set to parse them
using just .php is perfectly fine.
using .inc.php as you say, is just for readbality purposes, and to see at a glance, what files do what
Posted: Wed May 25, 2005 5:18 am
by onion2k
It's an organisational thing. I have .inc.php, .class.php, .function.php, .image.php .. all sorts of things. I find it useful.
Posted: Wed May 25, 2005 11:46 am
by Chris Corbyn
onion2k wrote:It's an organisational thing. I have .inc.php, .class.php, .function.php, .image.php .. all sorts of things. I find it useful.
That's exactly the way I do things. It also makes searching for files much easier for me too.
.function.php
.class.php
.inc.php
.image.php
.css.php (dynamic css scripts)
.js.php (dynamic js scripts)
yadda yadda yadda
