| Basics | Headings | Formatting | Font Tags | Font Styles | Lines | Links | Lists | Images | Tables | SSI | Frames | Glossary |

Server Side Include (SSI)


Server Side Include (SSI) refers to system call from within an HTML document. What happens is that when the server gets a request to send an HTML page that contains SSI's, the server interprets the information and sends that information instead of the actual code.

If I type <!--#echo var="REMOTE_ADDR"--> the server reads that as a command that needs to be interpreted and then sends you the information obtained by running that command. The server basically reads a variable called REMOTE_ADDR that comes with your request and sends you what that variable is equal to - in this case - 75.49.226.88 .

The following examples have text preceding and then the Interpreted requests are in Bold. The command that is entered to achieve the SSI is on the line following each example.


this document was last modified on February 01, 2006
 <!--#config timefmt="%B %e, %Y"-->
        <!--#echo var="LAST_MODIFIED"-->

you are connecting from adsl-75-49-226-88.dsl.stlsmo.sbcglobal.net
 <!--#echo var="REMOTE_HOST"-->  

with the IP address of 75.49.226.88
<!--#echo var="REMOTE_ADDR"-->


this document name is ssi.shtml
<!--#echo var="DOCUMENT_NAME"-->

located at http://www.usd.edu/trio/tut/html/ssi.shtml
root  http://www.usd.edu <!--#echo var="DOCUMENT_URI"-->

referred from (none)
<!--#echo var="HTTP_REFERER"-->

you are using Mozilla/4.0 (compatible; MS FrontPage 6.0)
<!--#echo var="HTTP_USER_AGENT"--> 

today is January 27, 2007
<!--#config timefmt="%B %e, %Y"-->
     <!--#echo var="DATE_LOCAL"--> 

The current time is 15:56:36
<!--#config timefmt="%H:%M:%S"-->
<!--#echo var="DATE_LOCAL"-->

include text from another file -- (sample not shown)
             <!--#include file="path to file"--> 
| Basics | Headings | Formatting | Font Tags | Font Styles | Lines | Links | Lists | Images | Tables | SSI | Frames | Glossary |

last modified February 01, 2006 22873