Include statement

Discussion in 'HTML' started by RA, Jun 27, 2003.

  1. RA

    RA Guest

    I am trying to use the 'include' statement to include code from another
    file. The syntax that my book gives for it : <!--#include
    file="file.htm"--> does not produce any results. The code looks like a
    comment anyway, so I don't understand how that's supposed to work. I have
    the same menu on every page and just want to code it once and then include
    it in each page so I don't have to go through and change every page when I
    change something in the menu. Anyone else have any luck with it? Thanks!
    RA, Jun 27, 2003
    #1
    1. Advertising

  2. RA

    Steve Pugh Guest

    "RA" <> wrote:

    >I am trying to use the 'include' statement to include code from another
    >file. The syntax that my book gives for it : <!--#include
    >file="file.htm"--> does not produce any results. The code looks like a
    >comment anyway, so I don't understand how that's supposed to work. I have
    >the same menu on every page and just want to code it once and then include
    >it in each page so I don't have to go through and change every page when I
    >change something in the menu. Anyone else have any luck with it? Thanks!


    Have you checked that your server supports includes?

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jun 27, 2003
    #2
    1. Advertising

  3. RA wrote:

    > I am trying to use the 'include' statement to include code from another
    > file. The syntax that my book gives for it : <!--#include
    > file="file.htm"--> does not produce any results. The code looks like a
    > comment anyway, so I don't understand how that's supposed to work.


    It is an SSI directive.
    Your webserver software must be configured to look for SSI directives on the
    page. It will then include the file and send the combined file to the
    client.

    --
    David Dorward http://david.us-lot.org/
    Redesign in progress: http://stone.thecoreworlds.net/
    Microsoft announces IE is dead (so upgrade):
    http://minutillo.com/steve/weblog/2003/5/30/microsoft-announces-ie-is-dead
    David Dorward, Jun 27, 2003
    #3
  4. I have also been looking into SSI for pretty much the same reason. So
    I've been trying out a few things and it works great once uploaded to my
    server. But when I try to view the local copy of the page the "include"
    parts aren't displayed. I'm assuming this is normal behaviour due to
    the nature of SSI, but is there any way around this so that I can see
    what my pages will really look like before uploading them?

    Thanks.
    LC.
    Lorne Cameron, Jun 27, 2003
    #4
  5. RA

    Isofarro Guest

    Isofarro, Jun 27, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    785
  2. Jay McGavren
    Replies:
    11
    Views:
    1,106
    Alan Krueger
    Jan 16, 2006
  3. tedsuzman
    Replies:
    2
    Views:
    7,056
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  4. Ted
    Replies:
    1
    Views:
    448
    Duncan Booth
    Jul 22, 2004
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    877
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page