Forum Moderators: coopster

Message Too Old, No Replies

Simulating include statement with html only

         

flycast

11:14 pm on Jan 23, 2005 (gmt 0)

10+ Year Member



Is there a way to simulate the php include() statement in html that does not require php but only html? I have a bunch of html files that all have the exact same navagation coded into each file. I want to move the navagation code to one file and then include it into the html as the page is requested.

I have done this sucessfully in the past by inserting an include() statement inside php tags and running the html page through the php interpeter. Problem is that in this case I don't think that the host will let me run those html files through the php interpeter.

I have looked around in html at some of the tags that are not sure as much and as yet havn't found a way.

Any ideas?

dkin

11:25 pm on Jan 23, 2005 (gmt 0)

10+ Year Member



I believe you are wanting SSI

So use this code

<!--#include file="filename.txt" -->

I believe the included file must be a txt file, more experienced members will be able to elaborate on this but that may get you going.

Cheers