Welcome to WebmasterWorld Guest from 50.19.190.144

Forum Moderators: incrediBILL

Message Too Old, No Replies

Using include files in .htm pages

     
7:04 pm on Sep 14, 2010 (gmt 0)

New User

5+ Year Member

joined:Sept 14, 2010
posts:2
votes: 0


Hi there,

I was just wondering if anyone could advise of any server modifications I need to make in order to use .inc files in my HTML pages. If this is not possible, I would be ever so grateful if anyone could suggest an alternative method that achieves the same results as using include files in .htm pages.

Thanks in advance for your help.

Cubix
11:40 pm on Sept 14, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 31, 2005
posts:1108
votes: 0


For starters you need to tell us what sort of web server you are using.
4:57 pm on Sept 15, 2010 (gmt 0)

New User

5+ Year Member

joined:Sept 14, 2010
posts:2
votes: 0


Hi Dijkgraaf,

My site is hosted on a Linux server. If you need any further info, please let me know.

Thanks for your help,

Cubix
4:49 pm on Sept 16, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


in order to use .inc files in my HTML pages.


If an include is all you need, you should be able to use SSI, this is what it's for. Server Side Includes usually require an .shtml extension to tell the server to parse the file for directives.

If you don't want to rename the extensions, you can add a handler to tell the server to parse .htm and .html files as SSI.

The second way is to use PHP and include the files via PHP includes. PHP is a robust programming language and IMO is overkill for simple includes.