欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

PHP鏈嶅姟鍣ㄥ彉閲?SERVER璇﹁В

程序员文章站 2022-05-05 11:20:44
...
PHP鏈嶅姟鍣ㄥ彉閲?_SERVER璇﹁В

鏈嶅姟鍣ㄥ彉閲?$_SERVER 璇﹁В锛?/p>

1銆?_SESSION['PHP_SELF'] -- 鑾峰彇褰撳墠姝e湪鎵ц鑴氭湰鐨勬枃浠跺悕

2銆?_SERVER['SERVER_PROTOCOL'] -- 璇锋眰椤甸潰鏃堕?氫俊鍗忚鐨勫悕绉板拰鐗堟湰銆備緥濡傦紝鈥淗TTP/1.0鈥濄??/p>

3銆?_SERVER['REQUEST_TIME'] -- 璇锋眰寮?濮嬫椂鐨勬椂闂存埑銆備粠 PHP 5.1.0 璧锋湁鏁堛??/p>

4銆?_SERVER['argv'] -- 浼犻?掔粰璇ヨ剼鏈殑鍙傛暟銆?/p>

5銆?_SERVER['SERVER_NAME'] -- 杩斿洖褰撳墠涓绘満鍚嶃??/p>

6銆?_SERVER['SERVER_SOFTWARE'] -- 鏈嶅姟鍣ㄦ爣璇嗙殑瀛椾覆锛屽湪鍝嶅簲璇锋眰鏃剁殑澶翠俊鎭腑缁欏嚭銆?/p>

7銆?_SERVER['REQUEST_METHOD'] -- 璁块棶椤甸潰鏃剁殑璇锋眰鏂规硶銆備緥濡傦細鈥淕ET鈥濄?佲?淗EAD鈥濓紝鈥淧OST鈥濓紝鈥淧UT鈥濄??/p>

8銆?_SERVER['QUERY_STRING'] -- 鏌ヨ锛坬uery锛夌殑瀛楃涓诧紙URL 涓涓?涓棶鍙?? 涔嬪悗鐨勫唴瀹癸級銆?/p>

9銆?_SERVER['DOCUMENT_ROOT'] -- 褰撳墠杩愯鑴氭湰鎵?鍦ㄧ殑鏂囨。鏍圭洰褰曘?傚湪鏈嶅姟鍣ㄩ厤缃枃浠朵腑瀹氫箟銆偮?/p>

10銆?_SERVER['HTTP_ACCEPT'] -- 褰撳墠璇锋眰鐨?Accept: 澶翠俊鎭殑鍐呭銆?/p>

11銆?_SERVER['HTTP_ACCEPT_CHARSET'] -- 褰撳墠璇锋眰鐨?Accept-Charset: 澶翠俊鎭殑鍐呭銆備緥濡傦細鈥渋so-8859-1,*,utf-8鈥濄??/p>

12銆?_SERVER['HTTP_ACCEPT_ENCODING'] -- 褰撳墠璇锋眰鐨?Accept-Encoding: 澶翠俊鎭殑鍐呭銆備緥濡傦細鈥済zip鈥濄??/p>

13銆?_SERVER['HTTP_ACCEPT_LANGUAGE'] -- 褰撳墠璇锋眰鐨?Accept-Language: 澶翠俊鎭殑鍐呭銆備緥濡傦細鈥渆n鈥濄??/p>

14銆?_SERVER['HTTP_CONNECTION'] -- 褰撳墠璇锋眰鐨?Connection: 澶翠俊鎭殑鍐呭銆備緥濡傦細鈥淜eep-Alive鈥濄??/p>

15銆?_SERVER['HTTP_HOST'] -- 褰撳墠璇锋眰鐨?Host: 澶翠俊鎭殑鍐呭銆?/p>

16銆?_SERVER['HTTP_REFERER'] -- 閾炬帴鍒板綋鍓嶉〉闈㈢殑鍓嶄竴椤甸潰鐨?URL 鍦板潃銆?/p>

17銆?_SERVER['HTTP_USER_AGENT'] -- 杩斿洖鐢ㄦ埛浣跨敤鐨勬祻瑙堝櫒淇℃伅銆備篃鍙互浣跨敤 get_browser() 寰楀埌姝や俊鎭??/p>

18銆?_SERVER['HTTPS'] -- 濡傛灉閫氳繃https璁块棶锛屽垯琚涓轰竴涓潪绌虹殑鍊硷紝鍚﹀垯杩斿洖off.

19銆?_SERVER['REMOTE_ADDR'] -- 姝e湪娴忚褰撳墠椤甸潰鐢ㄦ埛鐨?IP 鍦板潃銆?/p>

20銆?_SERVER['REMOTE_HOST'] -- 姝e湪娴忚褰撳墠椤甸潰鐢ㄦ埛鐨勪富鏈哄悕銆傚弽鍚戝煙鍚嶈В鏋愬熀浜庤鐢ㄦ埛鐨?REMOTE_ADDR銆?/p>

21銆?_SERVER['REMOTE_PORT'] -- 鐢ㄦ埛杩炴帴鍒版湇鍔″櫒鏃舵墍浣跨敤鐨勭鍙c??/p>

22銆?_SERVER['SCRIPT_FILENAME'] -- 褰撳墠鎵ц鑴氭湰鐨勭粷瀵硅矾寰勫悕銆?/p>

23銆?_SERVER['SERVER_ADMIN'] -- 璇ュ?兼寚鏄庝簡 Apache 鏈嶅姟鍣ㄩ厤缃枃浠朵腑鐨?SERVER_ADMIN 鍙傛暟銆傚鏋滆剼鏈繍琛屽湪涓?涓櫄鎷熶富鏈轰笂锛屽垯璇ュ?兼槸閭d釜铏氭嫙涓绘満鐨勫??/p>

24銆?_SERVER['SERVER_PORT'] -- 鏈嶅姟鍣ㄦ墍浣跨敤鐨勭鍙c?傞粯璁や负鈥?0鈥濄?傚鏋滀娇鐢?SSL 瀹夊叏杩炴帴锛屽垯杩欎釜鍊间负鐢ㄦ埛璁剧疆鐨?HTTP 绔彛銆?/p>

25銆?_SERVER['SERVER_SIGNATURE'] -- 鍖呭惈鏈嶅姟鍣ㄧ増鏈拰铏氭嫙涓绘満鍚嶇殑瀛楃涓层??/p>

26銆?_SERVER['PATH_TRANSLATED'] -- 褰撳墠鑴氭湰鎵?鍦ㄦ枃浠剁郴缁燂紙涓嶆槸鏂囨。鏍圭洰褰曪級鐨勫熀鏈矾寰勩?傝繖鏄湪鏈嶅姟鍣ㄨ繘琛岃櫄鎷熷埌鐪熷疄璺緞鐨勬槧鍍忓悗鐨勭粨鏋溿??Apache 2 鐢?鎴峰彲浠ヤ娇鐢?httpd.conf 涓殑 AcceptPathInfo On 鏉ュ畾涔?PATH_INFO銆?/p>

27銆?_SERVER['SCRIPT_NAME'] -- 鍖呭惈褰撳墠鑴氭湰鐨勮矾寰勩?傝繖鍦ㄩ〉闈㈤渶瑕佹寚鍚戣嚜宸辨椂闈炲父鏈夌敤銆俖_FILE__ 鍖呭惈褰撳墠鏂囦欢鐨勭粷瀵硅矾寰勫拰鏂囦欢鍚嶏紙渚嬪鍖呭惈鏂囦欢锛夈??/p>

28銆?_SERVER['REQUEST_URI'] -- 璁块棶姝ら〉闈㈡墍闇?鐨?URI銆備緥濡傦紝鈥?index.html鈥濄??/p>

29銆?_SERVER['PHP_AUTH_DIGEST'] -- 褰撲綔涓?Apache 妯″潡杩愯鏃讹紝杩涜 HTTP Digest 璁よ瘉鐨勮繃绋嬩腑锛屾鍙橀噺琚缃垚瀹㈡埛绔彂閫佺殑鈥淎uthorization鈥滺TTP 澶村唴瀹癸紙浠ヤ究浣滆繘涓?姝ョ殑璁よ瘉鎿嶄綔锛夈??/p>

30銆?_SERVER['PHP_AUTH_USER']-- 褰?PHP 杩愯鍦?Apache 鎴?IIS锛圥HP 5 鏄?ISAPI锛夋ā鍧楁柟寮忎笅锛屽苟涓旀鍦ㄤ娇鐢?HTTP 璁よ瘉鍔熻兘锛岃繖涓彉閲忎究鏄敤鎴疯緭鍏ョ殑鐢ㄦ埛鍚嶃??/p>

31銆?_SERVER['PHP_AUTH_PW'] -- 褰?PHP 杩愯鍦?Apache 鎴?IIS锛圥HP 5 鏄?ISAPI锛夋ā鍧楁柟寮忎笅锛屽苟涓旀鍦ㄤ娇鐢?HTTP 璁よ瘉鍔熻兘锛岃繖涓彉閲忎究鏄敤鎴疯緭鍏ョ殑瀵嗙爜銆?/p>

32銆?_SERVER['AUTH_TYPE']--褰?PHP 杩愯鍦?Apache 妯″潡鏂瑰紡涓嬶紝骞朵笖姝e湪浣跨敤 HTTP 璁よ瘉鍔熻兘锛岃繖涓彉閲忎究鏄璇佺殑绫诲瀷銆?/p>

鍘熸枃:http://hi.baidu.com/sungoogle/blog/item/015d19305180869ba8018e68.html

PHP鏈嶅姟鍣ㄥ彉閲?SERVER璇﹁В

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频