Ok, they are not exactly stupid but I really couldn't come up with a better title. Really, this is a page that will deal with miscellaneous topics about web publishing.
They are contained within the HTML comment container <!-- -->. The problem with server side includes is that you can never 'see them'. Viewing the source shows nothing. That is because the server has replaced your SSI directive with the processed command.
In general, you may not be able to do server side includes. It depends on whether your server has enabled them. For a general reference see http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html. For use on matcmp only, you can consult http://www.matcmp.sunynassau.edu/ssi.htm.
For now, I will deal with server side includes as they apply to the servers (www.matcmp.sunynassau.edu and www.polar.sunynassau.edu) in the Dept. of MAT/STA/CMP and give the syntax to accomplish this.
One thing very important about SSI is that SPACING COUNTS. In other words, the syntax must be followed EXACTLY! Also, remember, SSI will not take effect until your page is copied to the server.
In general the format of the SSI is:
<!--#command command_argument="argument_value" -->
Remember, the spacing counts and thebold-italics text is for the particular SSI, or so I have been told. Books I have state that there must be a space before the closing -->. It seems on both Polar and Matcmp, it is not required.
It is often useful to place a the date of last page change on your page. This can be accomplished automatically by using the echo command of SSI to display the contents of the variable LAST_MODIFIED.
<!--#echo var="LAST_MODIFIED"-- >
Variable Name | Syntax | Result |
---|---|---|
DATE_LOCAL | <!--#echo var="DATE_LOCAL"--> | |
DOCUMENT_NAME | <!--#echo var="DOCUMENT_NAME" --> | |
DOCUMENT_URI | <!--#echo var="DOCUMENT_URI" --> | |
DATE_GMT | <!--#echo var="DATE_GMT" --> |
<!--#flastmod virtual="/~yourid/assign.htm" -->
Here is is:
<!--#config timefmt="string format" -->
The string format to make the date of a page appear as DDD, NN YYYY would be:
<!--#config timefmt="%b %d, %Y" -->
Here is a #config timefmt followed by a #flastmod of my home page:
<!--#echo var="LAST_MODIFIED"-->
. Rather, I use the #flastmod to date the current page. On polar the <!--#echo var="LAST_MODIFIED"-->
does obey whatever your #config timefmt is. You must do the #config timefmt prior to the #flastmod.
Format | Meaning |
---|---|
%a | Abbreviated weekday |
%A | Full weekday |
%b | Abbreviated month name |
%B | Full month name |
%c | Preferred date and time for the current locale |
%d | day 1-31 |
%m | Month 1-12 |
%U | Week number (Sunday first) |
%W | Week number (Monday first) |
%w | Day, Sunday=0 |
%x | Preferred date for the current locale |
%y | Year 00-99 |
%Y | Year with century |
%H | Hour 00-23 |
%I | Hour 01-12 |
%j | day 001-366 |
%M | Minute |
%p | am/pm |
%S | Second |
%X | Preferred time for the current locale |
%Z | Time zone |
<!--#count file="filename" -->