Home

Server Side Configuration Elements

JavaScript  

A user might want to place some information on a page that gives the user more information about a html page or an attached file. (Example: Last Modified Date, or File Size) This is accomplished by adding the code before or after some discriptive text. (Example: 'The page was last updated on ') The code required are as follows:

echo

prints the value of one of the include variables (select the hotlink for definitions detaled in #3). The only valid tag to this command is var, whose value is the name of the variable you wish to echo.

<!--#echo var="DOCUMENT_NAME"-->

Result: welcome.shtml

Lets break it down in order to understand it more.

  1. <!-- -->
    Includes are placed in comment code hiding it from display when viewed outside of the server enviroment.
  2. #echo
    Identifies the code to the server as an include event.
  3. var="DOCUMENT_NAME"
    Chooses the appropriate echo event and converts the data to text. The following are available on most servers:

    • DOCUMENT_NAME: The current filename.
      Example: variables.shtml

    • DOCUMENT_URI: The virtual path to this document (such as /~webcom/sample.shtml).
      Example: /help/inc/variables.shtml

    • QUERY_STRING_UNESCAPED: The unescaped version of any search query the client sent, with all shell-special characters escaped with \.
      Example: (none) Note: This variable will not be useful until searching and indexing is implemented.

    • DATE_LOCAL: The current date, local time zone.
      Example: Tuesday, 05-Sep-2000 09:51:12 PDT

    • DATE_GMT: Same as DATE_LOCAL but in Greenwich mean time.
      Example: Tuesday, 05-Sep-2000 16:51:12 GMT

    • LAST_MODIFIED: The last modification date of the current document.
      Example: Tuesday, 30-Mar-1999 15:29:38 PST

fsize
prints the size of the specified file. Valid tags match those of the include command. The resulting format of this command is subject to the sizefmt parameter of the config command.

<!--#fsize file="sample.txt"-->

Result: 1K (without sizefmt)

<!--#config sizefmt="bytes"-->
<!--#fsize file="sample.txt"-->

Result: 329 (with sizefmt)

flastmod
prints the last modification date of the specified file. Valid tags are the same as with the include command.

<!--#flastmod file="sample.txt"-->

Result: Thursday, 13-Jul-95 14:40:33

Java Applets
Available CGI
META Tags
Server Elements
  Page Includes
  Configuration
  Other Elements