#echo

The #echo directive instructs the Web server to insert the value of an environment variable into an HTML page. 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. For ASP scripts, you can access the environment variables by using the Response.ServerVariables method (see Visual Basic Object Model).

Syntax

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

 

Parameters
VariableName
Specifies the name of the variable whose value you want to insert. The variable can be one of the following:
Variable Meaning
ALL_HTTP All HTTP headers that were not already parsed into one of the other variables described in this table. These variables are of the form HTTP_header field name. The headers consist of a null-terminated string with the individual headers separated by line feeds.
AUTH_TYPE This contains the type of authentication used. For example, the string will be "Basic" if Basic authentication is used, and it will be "Integrated Windows Authentication" for integrated authentication. Other authentication schemes will have other strings. Since new authentication types can be added to the Web server, it is not possible to list all the string possibilities. If the string is empty, then no authentication is used.
AUTH_PASSWORD The value entered in the client's authentication dialog box. This variable is only available if Basic authentication is used.
AUTH_USER The value entered in the client's authentication dialog box.
CONTENT_LENGTH The number of bytes that the script can expect to receive from the client.
CONTENT_TYPE The content type of the information supplied in the body of a POST request.
DOCUMENT_NAME The current file name.
DOCUMENT_URI The virtual path to the current document.
DATE_GMT The current date in Greenwich Mean Time (GMT).
DATE_LOCAL The current date in the local time zone.
GATEWAY_INTERFACE The revision of the CGI specification used by the Web server. The revision is returned in the format CGI/revision.
HTTP_ACCEPT Special-case HTTP header. Values of the accept fields are concatenated, and separated by a comma (,). For example, if the following lines are part of the HTTP header:

   accept: */*; q=0.1
  accept: text/html
  accept: image/jpeg

the HTTP_ACCEPT variable will have a value of:

   */*; q=0.1, text/html, image/jpeg

LAST_MODIFIED The date that the current document was last modified.
PATH_INFO Additional path information, as given by the client. This consists of the trailing part of the URL after the script name, but before the query string, if any.
PATH_TRANSLATED This is the value of PATH_INFO, but with any virtual path expanded into a directory specification.
QUERY_STRING The information that follows the question mark (?) in the URL that referenced this script.
QUERY_STRING_UNESCAPED Unescaped version of the query string; that is, a version that is not URL encoded.
REMOTE_ADDR The IP address of the client or agent of the client (for example, gateway or firewall) that sent the request.
REMOTE_HOST The host name of the client or agent of the client (for example, gateway or firewall) that sent the request. IIS 2.0 and 3.0 returned an IP address for this parameter.
REMOTE_USER This contains the user name supplied by the client and authenticated by the server. This comes back as an empty string when the user is anonymous (but authenticated).
REQUEST_METHOD The HTTP request method.
SCRIPT_NAME The name of the script program being executed.
SERVER_NAME The server’s host name, or IP address, as it should appear in self-referencing URLs.
SERVER_PORT The TCP/IP port on which the request was received.
SERVER_PORT_SECURE A string of either 0 or 1. If the request is being handled on the secure port, this will be 1. Otherwise, it will be 0.
SERVER_PROTOCOL The name and version of the information retrieval protocol relating to this request. This is usually HTTP/1.0. The protocol is returned in the format name/version.
SERVER_SOFTWARE The name and version of the Web server answering the request. The server information is returned in the format name/version.
URL Gives the base portion of the URL. Parameter values will not be included. The value is determined when the Web server parses the URL from the header.

Example
<!-- Inserts the information that follows the question mark (?) -->
<!-- in the URL that called the page containing this directive. -->
<!-- #echo var="QUERY_STRING"-->