SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Help with SSI

  1. #1
    SPF Lifer
    Join Date
    Apr 2000
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would like to save myself some time and have all my pages in SSI format. However, I do not know where to start with this. From what I understand, I have to create some .txt file containing the main left bar navigation, and then call on that .txt file from every other page. If this is correct, how do I go about doing this?

    Any help is greatly appreciated.

  2. #2
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here:

    Header Page you want to include: save as header.inc in same dir as your home page
    Code:
    <html>
    <head>
    <title>My Site</title>
    </head>
    <body background="/images/background.jpg">
    pages you want to use it on: Name *.shtml
    Code:
    <!--#include virtual="/header.inc" -->
    <!-- Conetent Goes Here -->
    </body>
    </html>
    you got PHP? It's better than SSI if you ever want to use PHP on your pages...

    Here is an example of using PHP: save as *.php, *.php3, *.phtml
    Code:
    require "/home/username/domain-www/header.inc";
    <!-- Conetent Goes Here -->
    </body>
    </html>
    hope that helps!
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  3. #3
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, if you want to use php, this is much better:
    PHP Code:
    <?
    virtual
    ("/header.inc")
    ?>
    Or, with the virtual() function, you can also use a relative path, or even a PHP variable (although you'll probably want to wait 'til you know PHP for that ... sitepoint has some great tutorials though).

    Another place you might want to look is the tutorial on "How to create a database in 30 minutes" on webmasterbase.com

    It describes on how to use SSI and XSSI ... check it out.

    Good Luck!

    ... what's the world coming to?


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
  •