RE: [PHP] include files, ".php" or ".inc" ?
| From: | Graham Cossey | Date: | Sun, 21 Nov 2004 23:31:28 +0000 |
| Subject: | RE: [PHP] include files, ".php" or ".inc" ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202626@lists.php.net to get a copy of this message | ||
> Perry Jönsson wrote:
>
> > Jon-Eirik Pettersen wrote:
> >
> >> Perry Jönsson wrote:
> >>
> >>> Hello,
> >>>
> >>> Does it make any difference if you include
> >>> (include/require/include_once/require_once) files with extension
> >>> ".inc" or ".php"?
> >>
> >>
> >>
> >> No, it does not.
> >
> >
> >
> > What it the purpose of the ".inc" file then?
>
> For organization. The file name shows what the file is, without having
> to look at the contents of any scripts.
>
If you only have limited control/knowledge of Apache you could adopt
names something like: script.inc.php
In such a way PHP will always process the script as it's extension
is .php and you can easily identify that it is a script to be
included/required.
Graham