Server
Side Includes (SSI)
A
Server Side Include (SSI) is a special type of command that enables
CGI-BIN scripts (or other programs) to be run from within the HTML
code of a Web page. These commands differ from CGI-BIN in that they
do not accept input from the Web (i.e. they are run based on the
action of the Web page itself being requested and served to a visitor's
Web browser). These commands are most often used to insert real-time
clocks, date, counters, or specific information about the Web page
visitor (such as their IP address or Web browser type).
A typical
SSI (in this example, a text-based Web counter) would appear as
the following in HTML:
#exec cgi="/cgi-bin/counter-program.pl"
This
particular SSI would place the output of the counter program to
the location of the command in your Web page.
You
could add text before and after any SSI to show a more customized
look and feel:
This page has been accessed #exec cgi="/cgi-bin/counter-program.pl" times.
Would
display the following in your Web browser:
This
page has been accessed 300 times.
Make
sure the HTML file has a .shtml extension. This is required for
proper SSI processing.
For
more information regarding using SSI's, visit: http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html
|