PHP鏈嶅姟鍣ㄥ彉閲?SERVER璇﹁В
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP remains important in modern web development, especially in content management and e-commerce platforms. 1) PHP has a rich ecosystem and strong framework support, such as Laravel and Symfony. 2) Performance optimization can be achieved through OPcache and Nginx. 3) PHP8.0 introduces JIT compiler to improve performance. 4) Cloud-native applications are deployed through Docker and Kubernetes to improve flexibility and scalability.

To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python each have their own advantages and are suitable for different scenarios. 1.PHP is suitable for web development and provides built-in web servers and rich function libraries. 2. Python is suitable for data science and machine learning, with concise syntax and a powerful standard library. When choosing, it should be decided based on project requirements.
