This explains what you can do with SSI on your server.
SSI are directives that are placed in HTML pages, and are parsed by the server while the pages are being served.
SSI directives are of the following syntax:
<!--#element attribute=value attribute=value -->
The most noticable thing you can do with SSI is to include other files into a page. This file can be anything from a basic text file to a full blown perl script.
To include another file into a page then you need to use different directives depending on the file you are including.
For a CGI file, you would use one of the following syntax:
<!--#include virtual="/cgi-bin/script.pl" -->
Or
<!--#exec cgi="/cgi-bin/script.pl" -->
For a basic text or html file, you can use on of the following:
<!--#include virtual="/myfile.html" -->
Or
<!--#include file="/myfile.html" -->
Some other things that can be done with SSI are as follows:
Include the date and time on your page:
<!--#echo var="DATE_LOCAL" -->
Now, to take this a little further, you can specify the format that the time is displayed in by using the following:
<!--#if expr="${HTTP_USER_AGENT} = /MSIE/ && $platform =/mac/" -->
MAC IE
<!--#elif expr="$platform =/mac/" -->
MAC, NOT IE
<!--#else -->
NOT MAC
<!--#endif -->
SSI is certainly not a replacement for CGI, or other technologies used for generating dynamic web pages, but it is a great way to add small amounts of dynamic content to pages, without doing a lot of extra work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.