SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: How to include page.htm in page.shtml

  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    india
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to include page.htm in page.shtml

    Hi All,

    I want to include page.htm in a td of page.shtml. I have managed to get the code which is : <!-- #include file="page.htm" -->

    I have entered this code in the td of page.shtml, where i want the contents of page.htm to appear.

    Both the files are in the same folder and I have also uploaded the files in the server. But the problem is its not working.

    Can anyone plz help me out.

    Jayanti

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Firstly, it would need to be like this :
    Code:
    <!--#include virtual="page.htm" -->
    Secondly - be careful. One mistake that a lot of people make when they first try to do this is include a complete html page in the .shtml page - doctype and everything. All you should be including is some html (maybe of your footer/menu) - no doc-type, no <html> tags, no meta tags and no <body> tags - just the html that you want to include. (maybe this isn't your problem, but I've seen it happen so many times I really think it's worth stressing for anyone reading this).

    I hope this helps.

  3. #3
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't NEED to be VIRTUAL, I believe you only need VIRTUAL when you are relatively pointing to a file in a sub directory of the server.

    Can you point us to a URL?

  4. #4
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Nicky
    It doesn't NEED to be VIRTUAL, I believe you only need VIRTUAL when you are relatively pointing to a file in a sub directory of the server.

    Can you point us to a URL?
    Fair enough. I used to use SSI and I remembered that when i tried it with 'file=""' it didn't work for me, but 'virtual' did... I guess that was just me.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •