The #config directive specifies the format used for error messages, dates, and file sizes returned to the client browser. You must surround a directive with HTML comment delimiters.
This directive can be used only in HTML pages; it cannot be used in ASP pages.
<!-- #config Output = String -->
Output
Specifies the output to be formatted. The output can be one of the following:
Output | Meaning |
ERRMSG | Controls the message returned to the client browser when an error occurs during the processing of an SSI directive. By default, the error message provides debugging information that details exactly what went wrong. To suppress these details, provide a short, simple error message, such as "An SSI error has occurred." The String parameter contains the new error message. |
TIMEFMT | Specifies the format in which dates should be returned to the client browser. The String parameter specifies the format. You can extract individual portions of the date, such as the day of the week or the month, by using formatting tokens in String. (The formatting tokens are the same as those you would use for the ANSI C strftime function).
Note The time and date functions below use the language set with the C library locale rather than the operating system locale. The C library locale is usually set to English. %a Abbreviated name for day of the week (for example, Mon). %A Complete name for day of the week (for example, Monday). %b Abbreviated month name (for example, Feb). %B Complete month name (for example, February). %c Date and time representation that is appropriate for the locale (for example, 05/06/91 12:51:32). %d Day of the month as a decimal number (01–31) %H Hour in 24-hour format (00–23). %I Hour in 12-hour format (01–12). %j Day of the year as a decimal number (001–366). %m Month as a decimal number (01–12). %M Minute as a decimal number (00–59). %p Current locale's A.M. or P.M. indicator for 12-hour format (for example, PM). %S Second as a decimal number (00–59). %U Week of the year as a decimal number, with Sunday as the first day of the week (00–51). %w Day of the week as a decimal number, with Sunday as the first day (0–6). %W Week of the year as a decimal number, with Monday as the first day of the week (00–51). %x Date representation for the current locale (for example, 05/06/91). %X Time representation for the current locale (for example, 12:51:32). %y Year without the century as a decimal number (for example, 69). %Y Year with the century as a decimal number (for example, 1969). %z, %Z Time-zone name or abbreviation; no characters if time zone is unknown. %% Percent sign. |
SIZEFMT | Displays the file size in kilobytes or bytes. The String parameter can have two values: "ABBREV" displays file sizes in kilobytes, and "BYTE" displays files sizes in bytes. |
The file containing the #config directives must use a file name extension that is mapped to the SSI interpreter; otherwise, the Web server will not process the directives. By default, the extensions .stm, .shtm, and .shtml are mapped to the interpreter (Ssinc.dll).
<!-- Set the error message. -->
<!-- #config errmsg="An SSI error has occurred." -->
<!-- Display the time in HH:MM:SS format (for example, 23:59:59). -->
<!-- #config timefmt="%H:%M:%S" -->
<!-- Display the time in MM/DD/YY (for example, 06/28/1996). -->
<!-- #config timefmt="%m/%d/%y" -->
<!-- Display file sizes in bytes. -->
<!-- #config sizefmt="bytes" -->