|
-
May 17th, 2004, 02:29 PM
#1
Thread Starter
Frenzied Member
include .php or .inc?
I've been doing some reading and I'm finding that when people use a repetitive file that is included in a lot of different pages, they make that file a "whatever.inc" file. Are there any advantages? I've just been including php files. I know they all get included the same way, so is it just a distinction thing?
-
May 17th, 2004, 02:58 PM
#2
Ex-Super Mod'rater
I have seen this too but mainly filename.inc.php
I think its just so they know the file is never meant to be opened directly only ever included.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 17th, 2004, 03:10 PM
#3
One advantage (or .php over .inc) is that if some one tries to go straight to the file in their browser, it'll run. IF you use jsut .inc, it'll return as a text file and may be able to read it.
TG
-
May 17th, 2004, 03:47 PM
#4
Ex-Super Mod'rater
While we're on the topic what are .php3 files? I know that phps files show the source code with coloring but I was wondering if the php3 files are along these lines or are they treat like php files but informing you they were made for V3 or something? .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 17th, 2004, 04:18 PM
#5
typically ph3 files were from the days of PHP 3. Because there were some changed to the language w/ 4, the 3 was used to signify that i used v3.x, allowing php4+ and php3 to run side by side (at least this is what I've been told.)
TG
-
May 18th, 2004, 02:52 PM
#6
Stuck in the 80s
Originally posted by techgnome
One advantage (or .php over .inc) is that if some one tries to go straight to the file in their browser, it'll run. IF you use jsut .inc, it'll return as a text file and may be able to read it.
TG
I'd use .php instead of .inc for the reasons techgnome stated above.
In an early release of my vbsNews program, I used .inc for included files, then someone sent me an email saying "You know that people can view the database passwords when they browse to the config.inc page, right?"
Needless to say, I switched to using .php for the included files.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|