PDA

View Full Version : Term of the day: server-side include


Keefe
09-25-2002, 03:25 PM
Abbreviated SSI. A type of HTML comment that directs the Web server to dynamically generate data for the Web page whenever it is requested. The basic format for SSIs are:
<!--#command tag="value">

Where #command can be any of various commands supported by the Web server. The simplest command is #include, which inserts the contents of another file. This is especially useful for ensuring that boilerplate components, such as headers and footers, are the same on all pages throughout a Web site. To change a boilerplate element, you need only modify the include file, instead of updating every individual Web page.

SSIs can also be used to execute programs and insert the results. They therefore represent a powerful tool for Web developers.

There is no official standard for SSIs, so every Web server is free to support different SSIs in different manners. However, many SSI commands, such as #include and #exec, have become de facto standards.

Web pages that contain SSIs often end with a .shtml extension, though this is not a requirement. The filename extension enables the Web server to differentiate those pages that need to be processed before they are sent to the browser.

As you have most likely noticed, all of the pages on Techware Labs(exept the forums) are .shtml pages. We use this to include our header, footer, and left + right navigation bars. This saves us a lot of time and we can easily display things on every page if we wish.

Uranium-235
09-25-2002, 05:54 PM
I just use <? include("filename"); ?> :P

Keefe
09-25-2002, 06:07 PM
Yeah, they you have to have .php files instead of .shtml

trend
10-01-2002, 10:35 PM
SSI's are your friend
:)

eviltechie
10-02-2002, 06:41 PM
i dont know SSI yet

or so SSI dont know me yet
:P

Uranium-235
10-02-2002, 06:43 PM
SSI is easy. tooo easy

eviltechie
10-02-2002, 07:24 PM
well i dont even do php and only a little bit of html

Uranium-235
10-02-2002, 08:31 PM
If you know HTML, you can do SSI

eviltechie
10-02-2002, 08:45 PM
i know it enuf to type out SSI but never used it

thats what i mean by i dont know SSI and SSI dont know me