include file using html

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfaisalwarraich
    New Member
    • Oct 2007
    • 194

    include file using html

    hi everybody,

    im trying to include a html file inside another html file. please tell me how i can do this. im trying with this tag but its not working for me please tell me what im doing wrong here.

    Code:
     <!--#include file="includes/sidebar.html" -->
    an early reply is requested please.

    tahnx
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You can't do this with HTML. That syntax is for server-side includes. You need to have it enabled on your server.

    Comment

    • mfaisalwarraich
      New Member
      • Oct 2007
      • 194

      #3
      please tell me how i can enable it on server? i have seen dat if im going to change the extension from html to shtml then its working otherwise its not working. please tell me how i can do this in my server side includes?

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Yes, you will need to change the extension, or if using a modern web server, you could work with the .HTML extension.

        How you set it up on your server depends on which server software you're using. Here's a tutorial for Apache.

        Comment

        Working...