The variables can be written into your web pages using the following code:
<!--#echo var="CONTENT_LENGTH" -->
The code looks like a HTML comment, but when the document is processed by the server it finds the current value for that variable and echos (writes) it into the page.
To use pages which include this code you must use the .shtml file extension. It is supported by most web servers, but may need to be enabled.
The following table shows the variable values taken from the web server that this site is running on.
| Current Value | SSI Echo Var | Description |
|---|---|---|
| 0 | CONTENT_LENGTH | size of input posted from client |
| CONTENT_TYPE | type of content | |
| Friday February 10 2012 | DATE_GMT | The current GMT (greenwich, UK) can be formatted using #config |
| Friday February 10 2012 | DATE_LOCAL | current time/date, can be formatted using #config |
| E:\Inetpub\wwwroot\ashwarp.com\web309\examples\SSI_ECHO.shtml | DOCUMENT_NAME | document name that was requested |
| /examples/SSI_ECHO.shtml | DOCUMENT_URI | URL of the document |
| Monday January 19 2004 | LAST_MODIFIED | document modified date, can be formatted using #config |
| Variable 'PAGE_COUNT' cannot be found |
PAGE_COUNT | number of accesses to current document since server was brought on line |
| Variable 'HTTP_REFERER' cannot be found |
HTTP_REFERER | URL of the document the client came from |
| 38.107.179.209 | REMOTE_ADDR | Numeric IP address of the client |
| 38.107.179.209 | REMOTE_HOST | domain name of the client (DNS option must be active on server) |
| web309.ashwarp.com | SERVER_NAME | server hostname (i.e., www.ashwarp.com) |
| GET | REQUEST_METHOD | HTTP method: GET OR POST |
| REMOTE_USER | ID of user, rarely ever found | |
| 80 | SERVER_PORT | the port used by httpd (usually 80) |
| HTTP/1.1 | SERVER_PROTOCOL | Which version of Httpd compliance |
| Microsoft-IIS/6.0 | SERVER_SOFTWARE | The name of the server software, i.e., apache 1.2.5 |
| Variable 'TOTAL_HITS' cannot be found |
TOTAL_HITS | total pages served by server since brought on line |
| Back to TOP |