| Home News Product Order Forum Feedback Partner Profile | © Neatware 2000 |
| Neatware | Snaml |
|
Variable |
|
|
Last Update: Wed Apr 12 20:08:21 2000 |
|
Snaml Basic
Introduction Syntax Control Types Modules Status Snaml HTML HTML Structure Link Objects Text Font Snaml CSS CSS Script Snaml CGI CGI Variables Output Form Application Snaml XML XML Document EBNF |
Environment variables store network system information that a CGI program needed. Snaml environment variables can be accessed through env global array. For example,
Server information variables provide the server status. 'GATEWAY_INTERFACE' is the CGI revision of the server; 'SERVER_NAME' is the host name or IP address of the server; and 'SERVER_SOFTWARE' is the name and version of server software. In additon, 'SERVER_PROTOCOL' is the name and revision of the protocol such as HTTP 1.0. Finally, 'SERVER_PORT' is the host port number
Client sends its information to the server through the environment variables. 'HTTP_USER_AGENT' stores the name of a client browser. 'HTTP_USER_FROM' is the email address of a client. Unfortunately, most browsers does not support this property. In addition, 'HTTP_ACCEPT' is a list of MIME type that a client can recognize. 'HTTP_REFERER' is the URL of a client before its visiting. The tracing information of a visitor's URL is useful for statistics.
Directory information variables provide path information. 'DOCUMENT_ROOT' is the root directory for a web document; 'PATH_INFO' is the extra path information to a CGI program; and 'PATH_TRANSLATED' is the path that maps PATH_INFO to the root directory. Finally 'SCRIPT_NAME' is the relative path name of a CGI script.
Content information variables provide the information of CGI data. Where 'QUERY_STRING' stores the query data to the CGI program. For example, http://www.neatware.com/cgi-bin/user.tcl?rayn is a query string. The string 'rayn' after the ? is the value of the env(QUERY_STRING). 'CONTENT_TYPE' is the MIME type that sends to the CGI program. And 'CONTENT_LENGTH' is the length of data to CGI.
Authentication and Identification specify the method of authentication and the identification of user. 'AUTH_TYPE' stores the authentication method; 'REMOTE_HOST' and 'REMOTE_ADDR' are remote hostname and IP address; and 'REMOTE_USER' is user's name. Finally, 'REMOTE_IDENT' is the user name who makes request.
GET method makes form data contained in a URL string. POST method makes CGI program receive data as an input stream.
|
|
|
|
Last Update: Wed Apr 12 20:08:21 2000 |
|
Variable |
| Neatware | Snaml |
| Home News Product Order Forum Feedback Partner Profile | © Neatware 2000 |