320
Creating Cool Web Sites with HTML, XHTML, and CSS
Here’s an example of how to write a small HTML snippet that includes almost all of these SSI variables: <table border=”1” cellpadding=”4” cellspacing=”1”>
<tr><td bgcolor=”#DDDDDD”>DOCUMENT NAME</td>
<td>
<!—#echo var=”DOCUMENT_NAME” — >
</td></tr>
<tr><td bgcolor=”#DDDDDD”>DOCUMENT URI</td>
<td>
<!—#echo var=”DOCUMENT_URI” — >
</td></tr>
<tr><td bgcolor=”#DDDDDD”>DATE_LOCAL</td>
<td>
<!—#echo var=”DATE_LOCAL” — >
</td></tr>
<tr><td bgcolor=”#DDDDDD”>DATE_GMT</td>
<td>
<!—#echo var=”DATE_GMT” — >
</td></tr>
<tr><td bgcolor=”#DDDDDD”>LAST_MODIFIED</td>
<td>
<!—#echo var=”LAST_MODIFIED” — >
</td></tr>
</table>
Figure 14-3 shows the results when you feed this code snippet through a Web browser by way of a Web server. Note that the file must have a .shtml suffix for your Web server to recognize that it contains SSI instructions.
Figure 14-3: You can use SSI variables to display interesting information.