Other Vitual Includes in web pages

Discussion in 'Tech Support' started by Booga, 15 May 2011.

  1. Booga

    Booga Cuppa tea anyone?

    Joined:
    28 Sep 2009
    Posts:
    767
    Likes Received:
    30
    Virtual Includes (sorry for sp in title)
    I have just started putting together a website and have been following some of the tutorials here

    I am using KompoZer and Notepad++ and a free hosting site.
    I wanted to have the navigation bar and footer as virtual includes and followed the advice to the letter, however I cannot get the navbar to appear on my site.

    I know I could just paste the navbar code straight into each page, but would like to use includes as it saves me repeating any changes right across the board.

    I have only included the code between the <bod></body> tabs as suggested and the index has the shtml extension.

    Any ideas what I am doing wrong?
    Code:
    [​IMG]

    What Kompozer says:
    [​IMG]

    Result:
    [​IMG]
     
    Last edited: 15 May 2011
  2. thehippoz

    thehippoz What's a Dremel?

    Joined:
    19 Dec 2008
    Posts:
    5,780
    Likes Received:
    174
    yeah the webserver your using isn't configured for server side includes

    http://httpd.apache.org/docs/current/howto/ssi.html

    in php you can load a page from anywhere with include

    <?
    include("http://www.zzzz.com/yourpage.php");
    ?>

    or what I like to do, load what's shared across all pages from a database
     
    Booga likes this.
  3. Booga

    Booga Cuppa tea anyone?

    Joined:
    28 Sep 2009
    Posts:
    767
    Likes Received:
    30
    Ah thanks, I am using 000webhost.
    I guess for now I'll have to do it all manually, which isn't that bad as there are only a few pages.
    Thansk :thumb:
     

Share This Page