Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include problems

Status
Not open for further replies.

stvchez123

Programmer
Apr 18, 2002
59
US
I'm having some trouble getting my HTML include to show up. Before writing this message, I went thoroughly through the previously posted forum questions and got alot of insight, but I'm not quite there

I've tried both of these options:

<!--#include virtual=&quot;include/main_header.html&quot;-->
<!--#include file=&quot;include/main_header.html&quot;-->

Neither work. is there anything I missed?
 
maybe try

/include/main_header.html

Listen All I ask is that You close out a Post You Started!!!!
 
Question, what kind of file are you trying to use the include in? It won't work in a html file you will have to use an ASP, PHP or SHTML file. Your include syntax looks right to me.

Glen
 
Another question - what exactly do you mean by &quot;not working&quot;?

View your page through the browser and do a &quot;view source&quot;. Do you see the <!--#include statements? If you do, then Glen's right and the includes aren't being actioned at all. Try changing the file extension to .shtml instead of .htm or .html.

If you don't see the <!--#include statement, or you see an error message, the include fired but couldn't find the file. Assuming the file can be found at then deecee's suggestion of
[tt]
<!--#include virtual=&quot;/include/main_header.html&quot;-->
[/tt]
is the one I'd try as the &quot;virtual&quot; directive and the leading slash makes it look for a file relative to the web site root.

-- Chris Hunt
 
Try it with a space between the &quot; and the -->

so (inncluding Chris's and Deecee's adivce)
<!--#include virtual=&quot;/include/main_header.html&quot; -->
or
<!--#include virtual=&quot;include/main_header.html&quot; -->


<!--#sig value=''É'' url='' -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top