Does anyone know how to use the include command in a HTML file? I can make it work in php but the <!--#include file="filename"--> doesnt seem to work when i use it in HTML, any ideas? <!--#include file="filename"--> Code (markup): does not work adding an extra space after the filename? <!--#include VIRTUAL="/filename.shtml" --> Code (markup): or <!--#include file="/filename.shtml" --> Code (markup): is that the right code? i rename my html to shtml?
You can't have server side includes in HTML as HTML runs on the client and not the server. It works in PHP because PHP runs on the server. HTML on the other hand ignores anything between <!-- and -->
why dont you try php? if that support ur webspace? in that case u can simply include codes with this line.
hi, try this <!--#include virtual="file.html"--> and on .htaccess file (which is on your root directory) add this line, then only SSI will work on server: AddHandler server-parsed .html this will translate HTML file as SHTML, then only you SSI will work. Hope this will help.
yes he can use the include file in HTML, that is why i suggested him with proper code. I have used it alot time on my websites and my clients websites. if you go to my site from my signature link, it's a live example of it. SO IT'S POSSIBLE
why dont u change only the pages u want the dynamic content to appear.. converting to PHP wont take that much of a time anywys...
ok so i edit the .htaccess file by adding that line? wont that slow down the loading of other html pages that dont have an include?