File include?

how to include file in my HTML file…

i have found some tutorials on the internet but they are not working in my website.

Please help me i am creating a web template where i need to include header, footer, menu ect… files.

wating for usefull answares

i dont know about server… i am using shared hosting server

What server side language are you using to do the includes?

if you want to include one HTML file into another using “#include” then file extension should be changed to “shtml” otherwise it will not work properly…

Do you have your include code in an html page or an shtml page or a php page?

for the html (shtml) I use this: <!–#include file=“filename.html”–> wherever I want to include the file.

If you have it in an html page, first try renaming your index page to index.shtml to see if that works. If it does, you can leave it as that name. If you want it to continue as .html, you need to make sure that your htaccess file has your html parsed as shtml.

No matter what, read these 2 tutorials below.

See Mitch’s tutorial here: http://wiki.lunarpages.com/Easier_Way_to_Edit_Static_Content_Using_SSI.

And be sure to read this one - http://wiki.lunarpages.com/SSI_on_html_Web_Pages.

Both short and sweet and will probably solve your problem.

I have includes on both my html pages (parsed as shtml) and also on some php pages and can provide more information if needed.

By server-side language he means are you using PHP, ASP, ASP.NET, JSP, ColdFusion, Ruby, Python, Perl or something else to code your stuff. :slight_smile: