Forum Moderators: coopster

Message Too Old, No Replies

Include files Extension

         

hexdj

7:09 pm on Aug 19, 2005 (gmt 0)

10+ Year Member



I have a few file that I load as includes in my pages, like my navigation menu for example, Are these include files supposed to have any particular extension? or is it okay for them just to have .php extension or .htm?

Thanks

dreamcatcher

7:48 pm on Aug 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi hexdj,

.html will be fine. The include simply loads the page that is called. The only stipulation as far as I`m aware is the for parent file to be able to parse the include file.

dc

jatar_k

8:33 pm on Aug 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it doesn't matter what extension you use but it is always good to have a plan

it is good when you have libraries, included files, scripts and plain vanilla html pages to devise some naming convention. Lots of people find it much easier to manage the files that way.

It really doesn't matter, having no system and sticking with that is as much a system as any other.

one note on included files though if there is php code in them

they should use extensions that are php parsed or they should be stored outside of the web root so they can't be called directly in a browser so that your code is not exposed.