![]() |
|
Question: What is a server side include? |
|
Answer: Server side includes (SSI)s inserted into an HTML document allow real-time features to be inserted into a web page. |
Server side includes are scanned by the server when you request to see
an HTML document. These special tags inserted into the HTML will flag certain
information from the server to be inserted into the page as it is sent
to your browser. For instance:
| SSI example in red | SSI code |
|---|---|
| today is February 29, 2000 |
<!--#config timefmt="%B %e, %Y"--> <!--#echo var="DATE_LOCAL"--> |
| The current time is 08:21:48 |
<!--#config timefmt="%H:%M:%S"--> <!--#echo var="DATE_LOCAL"--> |
| your IP address is 208.223.205.130 |
<!--#echo var="REMOTE_ADDR"--> |
| your DNS entry is gmfw1.gm.com |
<!--#echo var="REMOTE_HOST"--> |
| this document was last modified on
December 17, 1999 |
<!--#config timefmt="%B %e, %Y"--> <!--#echo var="LAST_MODIFIED"--> |
There are several other SSI's in addition to these examples. One of the things that I've used is a SSI to include a common file into another HTML document. If you look at the bottom of all these pages from the Internet Basics 101 site, you probably noticed that the bottom of every page has the same footer. Well - I virtually included that file into all of the other files. If I changed the footer it would change on all of the pages.
| © 2000 HOME | Tutorials | [email protected] | Back to Internet 101 |