NOTE : Server Side Includes are HTTP server specific. At present SSI+ has been implemented in the WebQuest and WebQuest95 Web servers from Questar Microsystems, Netscape and Spry Web servers and the Microsoft Internet Information Server. You should check with your server maintainer to be sure that implementing SSI+ tokens in your HTML documents will have the desired effect.
The SSI specification document is written by Mark West of Questar Microsystems. For complete and up to date versions of the specification, visit the Questar Web site at http://www.questar.com/
Server side includes (SSI) applied to an HTML document, provide for interactive real-time features such as echoing current time, conditional execution based on logical comparisons, querying or updating a database, sending an e-mail etc., with no programming or CGI scripts.
As the SSI specification is continually updated, what is presented here is just a taster of SSI+ usage. For the complete and most recent documentation visit the Questar web site (see the link above)
The possible SSI+ tags that are currently useable are :
|'echo'||Allows the insertion of certain variables into a HTML document|
|'include'||Allows the insertion of files into HTML documents|
|'fsize'||Allows for the insertion of a file's size in a HTML document|
|'flastmod'||Allows for the insertion of a file's last modification date into a HTML document|
|'exec'||Executes an external executable file|
|'config'||Allows setting of various options for other SSI+ tags|
|'odbc'||Allows the querying and updating of external ODBC databases|
|'email'||Sends an e-mail whenever a page is accessed or a form is submitted|
|'if'||Allows conditional execution of other SSI tags and conditional printing of documents based on logical comparisons|
|'goto'||Makes a jump to a pre-defined SSI 'label'|
|'label'||Provides a target for 'goto' jumps|
|'break'||Terminates the HTML document at any point|
Some brief examples
'echo' tag is used for inserting certain variable data into a HTML document. For example :
You are using a <!--#echo var="HTTP_USER_AGENT" --> browser
would translate in the document as being (for the sake of this example, the browser is Internet Explorer 3.0 for Windows 95) :
You are using a Mozilla/2.0 (compatible; MSIE 3.0A; Windows 95) browser.
The various different
var values that this tag accepts are described fully in the SSI specification.
'include' tag provides the answer to one of the most common questions within HTML discussions. Namely, ‘How can I insert a file into an HTML page?’
By using the following in an HTML document :
would insert the contents of the file
/includes/page.htm into the current HTML document at the insertion point.
'email' tag can be used to send an e-mail message whenever (for example) a page is accessed, or some form data sent to a remote site.
Using the following in a document :
<!--#email tohost="htmlib.com" message="Thanks for the HTMLib" toaddress="firstname.lastname@example.org" subject="The HTMLib" -->
would cause the mail message (specified in the
message attribute) to the address specified in the
toaddress attribute (if they actually existed.)
As can be seen, the possibilities of SSI+ tags are extensive and it provides a mechanism for performing many common actions that would normally require CGI scripting. As said above, SSI+ use is server specific. If you wish to employ SSI+ tags in your HTML, consult your server maintainer to see if it is possible and also consult the Questar Web site (URL above) for the most recent specification.
© 1995-1998, Stephen Le Hunte
|file: /Techref/language/html/ib/Server_Side_Includes/ov.htm, 5KB, , updated: 2004/3/1 16:47, local time: 2018/9/22 18:04,
|©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.sxlist.com/techref/language/html/ib/Server_Side_Includes/ov.htm"> Server Side Includes</A>
|Did you find what you needed?|
Welcome to sxlist.com!
& kind contributors
just like you!
Please don't rip/copy
Copies of the site on CD
are available at minimal cost.
Welcome to www.sxlist.com!