CGI getenv Parameters

Source: Internet
Author: User

Variable name Describe
Content_Type The value of this environment variable indicates the information that is passed to the MIME type. Currently, the environment variable content_type is generally:application/x-www-form-urlencoded, He says the data comes from HTML form.
Content_length if the server and CGI How the program information is passed is POST , this environment variable even from the standard input STDIN The number of bytes of valid data that can be read in. This environment variable must be used when reading the input data.
Http_cookie within the client Cookies content.
Http_user_agent Provides customer browser information that contains a version number or other proprietary data.
Path_info The value of this environment variable is represented immediately after the CGI additional path information after the program name. It often appears as a parameter to a CGI program.
Query_string if the server and CGI How the program information is passed is GET , the value of this environment variable even if the information is passed. This information is followed by the CGI program name, with a question mark '? ' in between. separated.
Remote_addr The value of this environment variable is the client that sent the request. IP address, such as the above 192.168.1.67 . This value is always present. And it is a unique identifier that Web clients need to provide to the Web Server, which can be used in a CGI program to distinguish between different Web Client.
Remote_host The value of this environment variable contains the send CGI The host name of the requested client. If you do not support the query, you do not need to define this environment variable.
Request_method provides the method that the script is called. For scripts that use the http/1.0 protocol, only get and POST make sense.
Script_filename the full path of the CGI script
Script_name the name of the CGI script
server_name this is yours. WEB the host name, alias, or IP address.
Server_software The value of this environment variable contains the call CGI of the program HTTP the name and version number of the server. For example, the value above is apache/2.2.14 (Unix)
COMSPEC C:\WINDOWS\system32\cmd.exe
Document_root d:/web_root/cgi
Gateway_interface cgi/1.1
Http_accept text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Http_accept_encoding gzip, deflate, SDCH
Http_accept_language zh-cn,zh;q=0.8,en-us;q=0.6,en;q=0.4
Http_connection Keep-alive
Http_host localhost:8080
Http_user_agent mozilla/5.0 (Windows NT 5.1) applewebkit/537.36 (khtml, like Gecko) chrome/43.0.2357.134 safari/537.36
PATH D:\setup\masm;d:\setup\gcc\bin;
Query_string
Remote_addr 127.0.0.1
Remote_port 1817
Request_method GET
Request_uri /index.cgi
Script_filename d:/web_root/cgi/index.cgi
Script_name /index.cgi
Server_addr 127.0.0.1
Server_admin [No address given]
server_name localhost
Server_port 8080
Server_protocol http/1.1
Server_signature
Server_software Apache/2.2.21 (WIN32)
Content_length (NULL)

CGI getenv Parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.