an html problem...need help

Burnt

Platinum Member
Mar 20, 2001
2,211
0
0
anyone ever use the "<!--#include file="topbar.html"--> command? Well when I try to use it on my site hosted on VT's webspace, it doesn't work. But when I try to use it on geocities, it works fine. Does the #include command require something special on the server to do that?
 

royaldank

Diamond Member
Apr 19, 2001
5,440
0
0
I'm not real sure, but I have used it several times before on several servers.

Sometimes, you have to name the file .html for it to work (not .htm).

Sometimes, you have to name the file .shtml for it to work.

Also, I think the file you are including has to be in the same directory. Or at least, last time I used it, I had trouble including a file from a different directory within the same site.

Maybe that will help.
 

Cerebus451

Golden Member
Nov 30, 2000
1,425
0
76
I do know that many web servers have a switch to enable the use of server-side includes, so the VT server may either have this switch turned off, or it may be using server software that does not support server-side includes.
 

Burnt

Platinum Member
Mar 20, 2001
2,211
0
0
yeah, I think VT doesn't enable it. Damn...it would make things a lot easier because I'm using tables.
 

psualum

Member
Mar 18, 2002
90
0
0
If your file "topbar.html" is NOT in the same directory as the file that contains the include file then you have to list the entire path... although you can use a virtual path like this:

<!-- #INCLUDE VIRTUAL="/somedirectory/topbar.html" -->