There is various information that is often included in HTML documents, by necessity or by conforming to "good" practice: a copyright notice, a link to the content author's name and e-mail address, organization's name (if applicable). Such information is usually repeatitive. For large-scale sites, there is a lot of work required to enter this information on every page. Also, when the information changes, it (1) becomes a formidable task to make the corresponding changes on every page, and (2) increases the chance of introducing errors, as a result. By use of SSI's, such tasks can be readily automated and associated problems can be considerably reduced.


The echo directive returns the value of special SSI variables as well as other environment variables. Any dates are printed subject to the currently configured timefmt. The only parameter to this directive is var, whose value is the name of the variable you wish to echo.

All environment variables that are available to CGI programs are also available to SSI directives. There are also six environment variables that are exclusively available to SSI directives: DATE_GMT, DATE_LOCAL, DOCUMENT_NAME, DOCUMENT_URI, LAST_MODIFIED, and QUERY_STRING_UNESCAPED.

See the variables



CODEWhat you get
%a abbreviated weekday name - Fri
%A full weekday name - Friday
%b abbreviated month name> - Sep
%B full month name - September
%c locale's appropriate date and time representation - Fri Sep 7 20:40:48 2018
%C default date and time format - 20
%d day of month - 01 to 31 - 07
%D date as %m/%d/%y - 09/07/18
%e day of month - 1 to 31 (single digits are preceded by a blank) - 7
%h abbreviated month name (alias for %b) - Sep
%H hour - 00 to 23 - 20
%I hour - 01 to 12 - 08
%j day of year - 001 to 366 - 250
%m month of year - 01 to 12 - 09
%M minute - 00 to 59 - 40
%n insert a newline character -
%p string containing AM or PM - PM
%r time as %I:%M:%S %p - 08:40:48 PM
%R time as %H:%M - 20:40
%S second - 00 to 61 - 48
%t insert a tab character -
%T time as %H:%M:%S - 20:40:48
%U week number of year (Sunday is the first day of the week) - 00 to 53 - 35
%w day of week - Sunday=0 - 5
%W week number of year (Monday is the first day of the week) - 00 to 53 - 36
%x Country-specific date format - 09/07/18
%X Country-specific time format - 20:40:48
%y year within century - 00 to 99 - 18
%Y year as CCYY (4 digits) - 2018
%Z timezone name - MDT
http://freepages.rootsweb.com[an error occurred while processing this directive]:80/~elsi/computers/SSI-commands.html Last modified Friday, September 07, 2018