Just curious
.inc files
Moderator: General Moderators
- Skittlewidth
- Forum Contributor
- Posts: 389
- Joined: Wed Nov 06, 2002 9:18 am
- Location: Kent, UK
.inc files
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
Just curious
Re: .inc files
Using .inc on its own is bad, unless your server is set to parse themSkittlewidth 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 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
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
That's exactly the way I do things. It also makes searching for files much easier for me too.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.
.function.php
.class.php
.inc.php
.image.php
.css.php (dynamic css scripts)
.js.php (dynamic js scripts)
yadda yadda yadda