{"id":110,"date":"2012-11-07T18:51:43","date_gmt":"2012-11-07T10:51:43","guid":{"rendered":"http:\/\/www.yeetrack.com\/post\/2012-11-07\/php%2520$_SERVER%25E8%25AF%25A6%25E7%25BB%2586%25E5%258F%2582%25E6%2595%25B0%25E8%25A7%25A3%25E6%259E%2590"},"modified":"2013-04-20T17:29:09","modified_gmt":"2013-04-20T09:29:09","slug":"php_server%e8%af%a6%e7%bb%86%e5%8f%82%e6%95%b0%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.yeetrack.com\/?p=110","title":{"rendered":"php $_SERVER\u8be6\u7ec6\u53c2\u6570\u89e3\u6790"},"content":{"rendered":"<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SERVER\u7528\u6765\u83b7\u53d6\u670d\u52a1\u5668\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u6709\u5f88\u591a\u53c2\u6570\uff0c\u89e3\u6790\u5982\u4e0b\uff1a<\/p>\n<p><!--more--><\/p>\n<pre config=\"brush:php;toolbar:false;\">$_SERVER['PHP_SELF'] #\u5f53\u524d\u6b63\u5728\u6267\u884c\u811a\u672c\u7684\u6587\u4ef6\u540d\uff0c\u4e0e document root\u76f8\u5173\u3002\n$_SERVER['argv'] #\u4f20\u9012\u7ed9\u8be5\u811a\u672c\u7684\u53c2\u6570\u3002\n$_SERVER['argc'] #\u5305\u542b\u4f20\u9012\u7ed9\u7a0b\u5e8f\u7684\u547d\u4ee4\u884c\u53c2\u6570\u7684\u4e2a\u6570\uff08\u5982\u679c\u8fd0\u884c\u5728\u547d\u4ee4\u884c\u6a21\u5f0f\uff09\u3002\n$_SERVER['GATEWAY_INTERFACE'] #\u670d\u52a1\u5668\u4f7f\u7528\u7684 CGI \u89c4\u8303\u7684\u7248\u672c\u3002\u4f8b\u5982\uff0c\u201cCGI\/1.1\u201d\u3002\n$_SERVER['SERVER_NAME'] #\u5f53\u524d\u8fd0\u884c\u811a\u672c\u6240\u5728\u670d\u52a1\u5668\u4e3b\u673a\u7684\u540d\u79f0\u3002\n$_SERVER['SERVER_SOFTWARE'] #\u670d\u52a1\u5668\u6807\u8bc6\u7684\u5b57\u4e32\uff0c\u5728\u54cd\u5e94\u8bf7\u6c42\u65f6\u7684\u5934\u90e8\u4e2d\u7ed9\u51fa\u3002\n$_SERVER['SERVER_PROTOCOL'] #\u8bf7\u6c42\u9875\u9762\u65f6\u901a\u4fe1\u534f\u8bae\u7684\u540d\u79f0\u548c\u7248\u672c\u3002\u4f8b\u5982\uff0c\u201cHTTP\/1.0\u201d\u3002\n$_SERVER['REQUEST_METHOD'] #\u8bbf\u95ee\u9875\u9762\u65f6\u7684\u8bf7\u6c42\u65b9\u6cd5\u3002\u4f8b\u5982\uff1a\u201cGET\u201d\u3001\u201cHEAD\u201d\uff0c\u201cPOST\u201d\uff0c\u201cPUT\u201d\u3002\n$_SERVER['QUERY_STRING'] #\u67e5\u8be2(query)\u7684\u5b57\u7b26\u4e32\u3002\n$_SERVER['DOCUMENT_ROOT'] #\u5f53\u524d\u8fd0\u884c\u811a\u672c\u6240\u5728\u7684\u6587\u6863\u6839\u76ee\u5f55\u3002\u5728\u670d\u52a1\u5668\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u3002\n$_SERVER['HTTP_ACCEPT'] #\u5f53\u524d\u8bf7\u6c42\u7684 Accept: \u5934\u90e8\u7684\u5185\u5bb9\u3002\n$_SERVER['HTTP_ACCEPT_CHARSET'] #\u5f53\u524d\u8bf7\u6c42\u7684 Accept-Charset: \u5934\u90e8\u7684\u5185\u5bb9\u3002\u4f8b\u5982\uff1a\u201ciso-8859-1,*,utf-8\u201d\u3002\n$_SERVER['HTTP_ACCEPT_ENCODING'] #\u5f53\u524d\u8bf7\u6c42\u7684 Accept-Encoding: \u5934\u90e8\u7684\u5185\u5bb9\u3002\u4f8b\u5982\uff1a\u201cgzip\u201d\u3002\n$_SERVER['HTTP_ACCEPT_LANGUAGE']#\u5f53\u524d\u8bf7\u6c42\u7684 Accept-Language: \u5934\u90e8\u7684\u5185\u5bb9\u3002\u4f8b\u5982\uff1a\u201cen\u201d\u3002\n$_SERVER['HTTP_CONNECTION'] #\u5f53\u524d\u8bf7\u6c42\u7684 Connection: \u5934\u90e8\u7684\u5185\u5bb9\u3002\u4f8b\u5982\uff1a\u201cKeep-Alive\u201d\u3002\n$_SERVER['HTTP_HOST'] #\u5f53\u524d\u8bf7\u6c42\u7684 Host: \u5934\u90e8\u7684\u5185\u5bb9\u3002\n$_SERVER['HTTP_REFERER'] #\u94fe\u63a5\u5230\u5f53\u524d\u9875\u9762\u7684\u524d\u4e00\u9875\u9762\u7684 URL \u5730\u5740\u3002\n$_SERVER['HTTP_USER_AGENT'] #\u5f53\u524d\u8bf7\u6c42\u7684 User_Agent: \u5934\u90e8\u7684\u5185\u5bb9\u3002\n$_SERVER['HTTPS'] \u2014 \u5982\u679c\u901a\u8fc7https\u8bbf\u95ee,\u5219\u88ab\u8bbe\u4e3a\u4e00\u4e2a\u975e\u7a7a\u7684\u503c(on)\uff0c\u5426\u5219\u8fd4\u56deoff\n$_SERVER['REMOTE_ADDR'] #\u6b63\u5728\u6d4f\u89c8\u5f53\u524d\u9875\u9762\u7528\u6237\u7684 IP \u5730\u5740\u3002\n$_SERVER['REMOTE_HOST'] #\u6b63\u5728\u6d4f\u89c8\u5f53\u524d\u9875\u9762\u7528\u6237\u7684\u4e3b\u673a\u540d\u3002\n$_SERVER['REMOTE_PORT'] #\u7528\u6237\u8fde\u63a5\u5230\u670d\u52a1\u5668\u65f6\u6240\u4f7f\u7528\u7684\u7aef\u53e3\u3002\n$_SERVER['SCRIPT_FILENAME'] #\u5f53\u524d\u6267\u884c\u811a\u672c\u7684\u7edd\u5bf9\u8def\u5f84\u540d\u3002\n$_SERVER['SERVER_ADMIN'] #\u7ba1\u7406\u5458\u4fe1\u606f\n$_SERVER['SERVER_PORT'] #\u670d\u52a1\u5668\u6240\u4f7f\u7528\u7684\u7aef\u53e3\n$_SERVER['SERVER_SIGNATURE'] #\u5305\u542b\u670d\u52a1\u5668\u7248\u672c\u548c\u865a\u62df\u4e3b\u673a\u540d\u7684\u5b57\u7b26\u4e32\u3002\n$_SERVER['PATH_TRANSLATED'] #\u5f53\u524d\u811a\u672c\u6240\u5728\u6587\u4ef6\u7cfb\u7edf\uff08\u4e0d\u662f\u6587\u6863\u6839\u76ee\u5f55\uff09\u7684\u57fa\u672c\u8def\u5f84\u3002\n$_SERVER['SCRIPT_NAME'] #\u5305\u542b\u5f53\u524d\u811a\u672c\u7684\u8def\u5f84\u3002\u8fd9\u5728\u9875\u9762\u9700\u8981\u6307\u5411\u81ea\u5df1\u65f6\u975e\u5e38\u6709\u7528\u3002\n$_SERVER['REQUEST_URI'] #\u8bbf\u95ee\u6b64\u9875\u9762\u6240\u9700\u7684 URI\u3002\u4f8b\u5982\uff0c\u201c\/index.html\u201d\u3002\n$_SERVER['PHP_AUTH_USER'] #\u5f53 PHP \u8fd0\u884c\u5728 Apache \u6a21\u5757\u65b9\u5f0f\u4e0b\uff0c\u5e76\u4e14\u6b63\u5728\u4f7f\u7528 HTTP \u8ba4\u8bc1\u529f\u80fd\uff0c\u8fd9\u4e2a\u53d8\u91cf\u4fbf\u662f\u7528\u6237\u8f93\u5165\u7684\u7528\u6237\u540d\u3002\n$_SERVER['PHP_AUTH_PW'] #\u5f53 PHP \u8fd0\u884c\u5728 Apache \u6a21\u5757\u65b9\u5f0f\u4e0b\uff0c\u5e76\u4e14\u6b63\u5728\u4f7f\u7528 HTTP \u8ba4\u8bc1\u529f\u80fd\uff0c\u8fd9\u4e2a\u53d8\u91cf\u4fbf\u662f\u7528\u6237\u8f93\u5165\u7684\u5bc6\u7801\u3002\n$_SERVER['AUTH_TYPE'] #\u5f53 PHP \u8fd0\u884c\u5728 Apache \u6a21\u5757\u65b9\u5f0f\u4e0b\uff0c\u5e76\u4e14\u6b63\u5728\u4f7f\u7528 HTTP \u8ba4\u8bc1\u529f\u80fd\uff0c\u8fd9\u4e2a\u53d8\u91cf\u4fbf\u662f\u8ba4\u8bc1\u7684\u7c7b\u578b\u3002<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SERVER\u7528\u6765\u83b7\u53d6\u670d\u52a1\u5668\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u6709\u5f88\u591a\u53c2\u6570\uff0c\u89e3\u6790\u5982\u4e0b\uff1a<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[33],"tags":[24,7],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-coding","tag-php","tag-7"],"views":2519,"_links":{"self":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":2,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"predecessor-version":[{"id":421,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions\/421"}],"wp:attachment":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}