5.8 Tailoring SSI OutputThe config SSI command allows you to select the way error messages, file size information, and date and time are displayed. For example, if you use the include command to insert a non-existing file, the server will output a default error message like the following:
[an error occurred while processing this directive] By using the config command, you can modify the default error message. If you want to set the message to "Error, contact shishir@bu.edu" you can use the following:
<!--#config errmsg="Error, contact shishir@bu.edu"--> You can also set the file size format that the server uses when displaying information with the fsize command. For example, this command:
<!--#config sizefmt="abbrev"--> will force the server to display the file size rounded to the nearest kilobyte (K). You can use the argument "bytes" to set the display as a byte count:
<!--#config sizefmt="bytes"--> Here is how you can change the time format:
<!--#config timefmt="%D %r"--> The file address.html was last modified on: <!--#flastmod file="address.html"-->. The output will look like this:
The file address.html was last modified on: 12/23/95 07:17:39 PM The %D format specifies that the date should be in mm/dd/yy format, while the %r format specifies "hh/mm/ss AM|PM" format. Table 5.3 lists all the data and time formats you can use.
|
|