0

Is there a particular reason as to why some people use .inc and some just use plain .php for include files? Does actually do anything performance wise or does it just make it easier to distinguish between files?

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by digital-ether
1

Two distinguish an include file from another that contains a mix of php and html.

1

I personally never name a file ".inc" or any other *do not know the word in English*, except class-files.
I may name them as "[FileName].Class.php".

As Triztian wrote, it's to distinguish files from others.

0

Thanks for the info, so I guess it's just a matter of preference. I'll probably go for .inc.php thanks again

0

Just a note. A disadvantage of using .inc is that it will be visible to visitors if accessed directly. Using .php will hide the source code since the server will always parse the PHP before serving.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.