views:

27

answers:

2

I am attempting to include a header in my html file.

<!--#include virtual="/header.shtml" -->

This is not being read by the browser. The file works fine when I go to it alone. It works fine when I had it in the header (not through an include file).

Do some servers not allow this kind of include?

A: 

It really depends on what kind of include you are talking about. But for sure yes, there are several servers that don't allow includes.

OK so this is an SSI (server side include) and it must be supported by your webhost so you might want to rename your file to .shtml.

Wikipedia has a little more info on this

krico
oops meant to include the code<!--#include file="/header.shtml" -->
pfunc
A: 

That include instruction is for ASP pages, and unless the page is names *.asp it will not work

Try renaming the file to .asp, if this doesn't work then your webhost doesn't support ASP or virtual includes.

Tom Gullen