| Server-side includes allow you to have a common header or footer for all pages, and change it by editing one file. The web server builds the page from the fragments each time it is requested. There are also several other functions of server-parsed html.
To make your html file be treated as shtml, rename it to filename.shtml. You can now put commands into your html to perform specific functions.
Insert an html fragment
<!--#include virtual="footer.html" -->
This will insert the contents of footer.html in place of the command.
Run a CGI script
<!--#include virtual="/cgi-bin/textcounter.cgi" -->
This inserts the output of the CGI script where the command is.
Do not use the "exec cgi" command to run cgi, it is outdated and discontinued.
Show the date
<!--#config timefmt="%B %e, %Y" --><!--#echo var="DATE_LOCAL" -->
These two commands work together. The first configures the time format, and the second actually displays the date. Many time configuration options are available, see the Solaris strftime manual page for the full listing (when logged in with telnet or ssh, type "man strftime").
|