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?

Recommended Answers

All 4 Replies

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

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.

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.