homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Using include files
can they be used in plain .html pages?

 1:41 pm on Jul 1, 2003 (gmt 0)
I think i know the answer to this, but thought i would double check.

Is it possible to use an include tag i.e. <!--#include FILE="../include/stufftoinclude.inc"-->

within a plain .htm or .html page?

I came across this earlier today, when i tried to use an include file to show a copyright credit on one of our sites. The idea being that come next year, i can update the include file to 2004, rather than changing every page in the directory.

However, unless the page extension was .asp, the include just came up as an HTML comment, and wouldn't work.

Am i just missing somthing? or is it just not possible to use includes on a plain .htm/.html page?




 1:43 pm on Jul 1, 2003 (gmt 0)

Make html and htm parsed by IIS and you will get it to work.


 1:47 pm on Jul 1, 2003 (gmt 0)

I know what you are saying is probably simple........but im not sure exactly what you mean.



 1:53 pm on Jul 1, 2003 (gmt 0)

You just need to edit your .htaccess file to treat html files the same as shtml files. Search on Google for ".htaccess tutorial" or something similar and there are some good sites that show you how to do this easily. Only takes a few minutes. Good luck.


 1:55 pm on Jul 1, 2003 (gmt 0)

I guess we need to know if it is Unix or windows host. I assumed windows since you said ASP.


 2:02 pm on Jul 1, 2003 (gmt 0)

HTML will not process includes unless you change a setting on the server. However, from your post I am guessing you are using shared hosting on a Window box. In this case, I'm afraid your stuck. Either change the file extensions to asp or you can see frames/iframes as a quick solution.



 2:40 pm on Jul 1, 2003 (gmt 0)

cheers for all of the above. In answer to Korkus2000, it is Windows server we have. I know what IIS is, i just didn't understand what you told me to do.

Server setup is something i am having to learn using books and forums etc, but im getting there!

I will look into the .htaccess comment.



 2:47 pm on Jul 1, 2003 (gmt 0)

Don't worry about htaccess unless you have loaded apache. You need to go into your IIS manager from the control panel. Go to the virtual folder you are using for the site. Click properties. Go to the configure button on the virtual folder tab. Then map .htm to the asp.dll.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved