Getting Started tutorial-php function $_server

Source: Internet
Author: User
Tags http authentication

$_server[' php_self ': The name of the file that is currently executing the script, related to document root.

$_server[' argv ': arguments passed to the script.

$_server[' argc ': Contains the number of command-line arguments that are passed to the program, if running in command line mode.

$_server[' Gateway_interface ': The version of the CGI specification used by the server, for example: "cgi/1.1".

$_server[' server_name ': The name of the server host on which the script is currently running.

$_server[' Server_software ': A string that is identified by the server, given in the header in response to the request.

$_server[' Server_protocol ': The name and version of the communication protocol when the page is requested, for example: "http/1.0".

$_server[' Request_method ': The request method when accessing the page, for example:, POST and put.

$_server[' query_string ': A string of queries (query).

$_server[' Document_root ': The document root directory where the currently running script is located, defined in the server configuration file.

$_server[' http_accept ': The current requested ACCEPT: The contents of the head.

$_server[' Http_accept_charset ': The current requested accept-charset: The contents of the head, for example: "Iso-8859-1,*,utf-8".

$_server[' http_accept_encoding ': The current requested accept-encoding: The contents of the header, for example: "gzip".

$_server[' http_accept_language ': The current requested accept-language: The contents of the head, for example: "en".

$_server[' http_connection ': The current requested CONNECTION: The contents of the head, for example: "Keep-alive".

$_server[' http_host ': The current requested HOST: The contents of the header.

$_server[' http_referer ': link to the URL address of the previous page of the current page.

$_server[' http_user_agent ': The current requested user_agent: The contents of the head.

$_server[' REMOTE_ADDR ': The IP address of the user who is browsing the current page.

$_server[' Remote_host ': The host name of the user who is browsing the current page.

$_server[' Remote_port ': The port used by the user to connect to the server.

$_server[' script_filename ': the absolute pathname of the currently executing script.

$_server[' Server_admin ']: Administrator information.

$_server[' Server_port ': The port used by the server.

$_server[' server_signature ': A string containing the server version and the virtual host name.

$_server[' path_translated ': The basic path to the file system (not the document root) where the current script resides.

$_server[' Script_name ': Contains the path of the current script, which is useful when the page needs to point to itself.

$_server[' Request_uri ': the URI required to access this page, for example: "/index.html".

$_server[' Php_auth_user ': When PHP is running in the Apache module mode, and the HTTP authentication function is being used, this variable is the user name entered by the user.

$_server[' PHP_AUTH_PW ': When PHP is running in the Apache module mode, and the HTTP authentication function is being used, this variable is the password entered by the user.

$_server[' auth_type ': When PHP is running in the Apache module mode, and is using the HTTP authentication function, this variable is the type of authentication.

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.