什么是标准的CGI环境变量?

时间:2010-03-24 21:03:50

标签: cgi environment-variables

CGI脚本应该可以访问Web服务器设置的环境变量列表。他们叫什么名字?

4 个答案:

答案 0 :(得分:7)

有关CGI规范的信息,请参阅RFC 3875,其中包含您需要的所有信息。 : - )

来自RFC:

  meta-variable-name = "AUTH_TYPE" | "CONTENT_LENGTH" |
                       "CONTENT_TYPE" | "GATEWAY_INTERFACE" |
                       "PATH_INFO" | "PATH_TRANSLATED" |
                       "QUERY_STRING" | "REMOTE_ADDR" |
                       "REMOTE_HOST" | "REMOTE_IDENT" |
                       "REMOTE_USER" | "REQUEST_METHOD" |
                       "SCRIPT_NAME" | "SERVER_NAME" |
                       "SERVER_PORT" | "SERVER_PROTOCOL" |
                       "SERVER_SOFTWARE" | scheme |
                       protocol-var-name | extension-var-name
  protocol-var-name  = ( protocol | scheme ) "_" var-name
  scheme             = alpha *( alpha | digit | "+" | "-" | "." )
  var-name           = token
  extension-var-name = token

答案 1 :(得分:2)

答案 2 :(得分:2)

NCSA的具有CGI文档的“hoohoo”机器已关闭,但是here's what seems to be a mirror

答案 3 :(得分:1)

快速Google search找到您需要的内容。