# Include Tests

This file is:

The server supports server side command processing, generally known as server-side includes. The general HTML syntax is:

    <!--#command arg=value arg=value -->

The commands supported are:

include
  Include another file. The file is named with a virtual= or file= parameter. The virtual path is relative to the document root. The file path is relative to the current document.
echo
  Echo the value of an environment variable. See the Environment section below for the variables the server can set.
fsize
  Return the size of a file. The file is named with a virtual= or file= parameter. The virtual path is relative to the document root. The file path is relative to the current document.
flastmod
  Return the modify time of a file. The file is named with a virtual= or file= parameter. The virtual path is relative to the document root. The file path is relative to the current document.
exec
  Execute the cmd= parameter and insert the results.
  - <!--#fsize file=include.shtml -->:
  - <!--#flastmod file="include.shtml"-->:

  ## Environment

  Get these with

      <!--#echo var=varname -->

PATH_TRANSLATED:
CONTENT_LENGTH:
CONTENT_TYPE:
HTTP_ACCEPT :
HTTP_AUTHORIZATION:
HTTP_FROM :
HTTP_REFERER:
HTTP_USER_AGENT:
QUERY_STRING:
REQUEST_METHOD:
SERVER_PORT:
SERVER_NAME:
SERVER_SOFTWARE:
SERVER_PROTOCOL:
REMOTE_ADDR:

  ## Exec tests

  This should be the contents of /etc/motd, or a comment containing an error if it does not exist.

  There should be a comment following this that complains about a missing /xyzzy file, (unless you have one!)

  More stuff

  Below is an errant include that accidentally includes itself! The include processor limits the include depth to work around bugs like this.