It is formatted like an HTML comment, so if you don’t have SSI correctly
enabled, the browser will ignore it, but it will still be visible in the HTML
source. If you have SSI correctly configured, the directive will be replaced
with the results of the directive.
The element can be one of a number of things, and we’ll talk some more about
most of these in the next installment of this series. For now, here are some
examples of what you can do with SSI.
The
echoelement just spits out the value of a variable. There
are a number of standard variables, which include the whole set of environment
variables that are available to CGI programs. Also, you can define your own
variables with thesetelement.If you don't like the format in which the date gets printed, you can use the
configelement, with atimefmtattribute, to modify
that formatting.Today isModification Date of the
File4>This document last modifiedThis element is also subject to
timefmtformat configurations.Including the Results of a
CGI ProgramThis is one of the more common uses of SSI - to output the results of a CGI
program, such as everybody's favorite, a hit counter.We'll definately come back to this in another article.
Other Stuff
And, of course, there are a variety of other things that we can do with SSI.
I need to leave something to talk about next week. So, next week, we'll have a
lot more examples, and talk about some of the more involved things that you
will be able to do with SSI.Rich Bowen is the Director of Web Application Development at The Creative Group and the author of Apache Server Unleashed.
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.