Server Side Includes

Server Side Includes or SSI is a simple server-side scripting language used almost exclusively for the web. As its name implies, its primary use is including the contents of one file in another. SSI-enabled HTML files usually use the extension *.shtml or, more rarely, *.shtm.

Basic syntax

SSI has a simple syntax: <!--#directive parameter=value parameter=value-->. Directives are placed in HTML comments so that if SSI isn't enabled, users won't see SSI directives without viewing the source.

Directives

These are the most common SSI directives:
Directive Parameters Description Example
include file or virtual This is probably the most used SSI directive, allowing the content of one document to be included in another. The virtual parameter, which specifies the file or script to be included, should be used instead of the file parameter. <!--#include virtual="header.html"-->
exec cgi or cmd

If the cgi attribute is used, it should be the path to a CGI script to be executed. The PATH_INFO and QUERY_STRING of the current SSI script will be passed to the CGI script. include virtual should be used instead of exec cgi.

If the cmd attribute is used, it should be a shell command to be executed. The output of the command will be included in the page.

<!--#exec cgi="/cgi-bin/foo.cgi"--> or <!--#exec cmd="ls -l"-->

External links

See also

 

<< PreviousWord BrowserNext >>
central london
viru viru international airport
robert lee
emporia state university
the highwaymen
saint marcel ls annonay
cause for vieques
talencieux
talos iv
vostok, antarctica
jack spicer
pepperdine university
duke of lerma
ostrw island
operation noah
cardiac muscle
islands of gdansk
morgan motor company
phoebe (bird)
xforms
dingane
martin lee
national archives
daniel franois malan
collapse
falkirk wheel
martin ebbertz
johannes gerhardus strijdom
1820 in science
stardust memories
king's bench
karl korsch
new zealand music awards
battlement
free market environmentalism
kingbird
hms ibis (u99)
nexus magazine
general services administration
henry h. rogers
rudolph a. marcus
white tea
eddie irvine
night stalkers