![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Lonestar Home Search Lonestar Webmail Texas.Net (Business) Contact Info Account Info Change Password Add Popmail Spam Filter
Internet Alerts
Helpdesk
E-mail Support
Disclaimers
Internet Basics
Links
|
Using Server-Side Includes (SSI)A server-side include (SSI, for short) is a command to the web server embedded in the HTML. SSIs allow the creation of semi-dynamic web pages without the hassle of writing and maintaining of CGI scripts. Below are a few simple and useful SSI examples that you can use on your personal web page. If you'd like more advanced uses of SSIs, visit Apache's web site and read through their server documentation on SSIs.NOTE: This document is provided as-is by Texas.Net. SSIs are in no way supported by technical support or the Texas.Net helpdesk. Because SSIs require that the server be configured to parse through .html files, the ability to use SSIs may be removed at any time without warning.
Basics Of SSIs
When they appear in your code, they are completely replaced by whatever the server outputs (whether it be text from another HTML page or output from code or the result of a variable evaluation), so you won't be able to tell if their in your source code simply by viewing that code from your browser. When an SSI fails, you will see the line:
Sometimes, however, it may be hidden, especially if the output was supposed to generate part of a table, in which case, nothing would appear. The important thing to remember when using SSIs is that they must all be one line. You can't have line breaks separating the various portions of an SSI or it will simply be outputted to the browser that way (they won't appear in the browser though because they look like comments).
Displaying the "Last Modified" Date
You can put this line anywhere, although most people usually put this in the header or footer of the document. It's great for letting people know when you've last updated your web page.
A Consistent Look
This line will take the text from TOP.html and insert it wherever that SSI appears in our code, effectively transferring that entire block of HTML into our web page. With this, you can quickly create a site of numerous pages having, possibly, the same complex interface without hours of complex coding per page.
Variable Interpolation
Again, SSIs are not supported by Texas.Net. They are currently functioning due to our web server setup and may become inoperable at any time. |
| ©1994-2005, Texas.Net, Inc. All rights reserved. |