Need some help with using includes

Discussion in 'HTML & Website Design' started by NMay, Aug 3, 2008.

  1. #1
    For some strange reason I cant seem to get includes to work.

    I am using the code:

    <!--#include virtual="menu.html" -->

    With no success I wondered if anyone could help me work out why its not working!

    Thanks
     
    NMay, Aug 3, 2008 IP
  2. Spawny

    Spawny Well-Known Member

    Messages:
    252
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    what's that a template engine tags? try using php include('menu.html');
     
    Spawny, Aug 3, 2008 IP
  3. NMay

    NMay Well-Known Member

    Messages:
    200
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #3
    That would require my pages being php. I am using HTML pages thus the need for my include.
     
    NMay, Aug 3, 2008 IP
  4. master-mind

    master-mind Well-Known Member

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    111
    #4
    try this instead
    <!--#include file="menu.html" --> and make sure the path to menu.html is correct. or it should be in the same directory where the current file resided.

    Thanks
     
    master-mind, Aug 3, 2008 IP