What CGI variables are available on my server

If you want to find out what CGI variables you have available, just create a <cfdump var = "#cgi#">

Example output from local host:

struct

AUTH_PASSWORD

[empty string]

AUTH_TYPE

[empty string]

AUTH_USER

[empty string]

CERT_COOKIE

[empty string]

CERT_FLAGS

[empty string]

CERT_ISSUER

[empty string]

CERT_KEYSIZE

[empty string]

CERT_SECRETKEYSIZE

[empty string]

CERT_SERIALNUMBER

[empty string]

CERT_SERVER_ISSUER

[empty string]

CERT_SERVER_SUBJECT

[empty string]

CERT_SUBJECT

[empty string]

CF_TEMPLATE_PATH

C:\Inetpub\wwwroot\ApplayIT\cgi_test.cfm

CONTENT_LENGTH

0

CONTENT_TYPE

[empty string]

GATEWAY_INTERFACE

CGI/1.1

HTTPS

off

HTTPS_KEYSIZE

[empty string]

HTTPS_SECRETKEYSIZE

[empty string]

HTTPS_SERVER_ISSUER

[empty string]

HTTPS_SERVER_SUBJECT

[empty string]

HTTP_ACCEPT

*/*

HTTP_ACCEPT_ENCODING

gzip, deflate

HTTP_ACCEPT_LANGUAGE

en-us

HTTP_CONNECTION

Keep-Alive

HTTP_COOKIE

CFID=11202; CFTOKEN=60629250

HTTP_HOST

localhost

HTTP_REFERER

[empty string]

HTTP_USER_AGENT

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Dreamweaver MX 2004 7.0.2052)

PATH_INFO

/applayit/cgi_test.cfm

PATH_TRANSLATED

c:\inetpub\wwwroot\applayit\cgi_test.cfm

QUERY_STRING

[empty string]

REMOTE_ADDR

127.0.0.1

REMOTE_HOST

127.0.0.1

REMOTE_USER

[empty string]

REQUEST_METHOD

GET

SCRIPT_NAME

/applayit/cgi_test.cfm

SERVER_NAME

localhost

SERVER_PORT

80

SERVER_PORT_SECURE

0

SERVER_PROTOCOL

HTTP/1.1

SERVER_SOFTWARE

Microsoft-IIS/5.1

WEB_SERVER_API

[empty string]

 

Example code:

<cfoutput>#CGI.SERVER_NAME#</cfoutput>

Output:

localhost

Advertisement

Radar: Subscribe & Save!

No User Comments.

No User Comments, be the first one to write your comments?

ApplayIT is owned by Scandic Systems LTD [UK] Company No. 5984000. All other trademarks and copyrights are the property of their respective holders.