$ Root = getenv ('document _ root'); // the ROOT directory of the server DOCUMENT
$ Port = getenv ('server _ port'); // SERVER PORT
$ File = getenv ('script _ name'); // The current execution file
$ Ua = getenv ('HTTP _ USER_AGENT '); // user UA
$ Method = getenv ('request _ method'); // REQUEST METHOD
$ Protocol = getenv ('server _ Protocol'); // Transfer PROTOCOL
Getmypid (), // returns the ID of the current PHP process. This function does not need to be input.
Get_current_user (), /// return the name of the owner of the current program. You do not need to enter a parameter for this function. Copy codeThe Code is as follows: Obtain the system type and version number: php_uname () (for example, Windows nt computer 5.1 build 2600)
Obtain only the system type: php_uname ('s ') (or: PHP_ OS, for example, Windows NT)
Obtain only the system version: php_uname ('R') (for example, 5.1)
Obtain the PHP running method: php_sapi_name () (PHP run mode: apache2handler)
Get the previous process Username: Get_Current_User ()
Get PHP version: PHP_VERSION
Get Zend version: Zend_Version ()
Obtain the PHP installation path: DEFAULT_INCLUDE_PATH
Obtain the absolute path of the current FILE: _ FILE __
Obtain the Host value in an Http request: $ _ SERVER ["HTTP_HOST"] (the returned value is a domain name or IP address)
Get server ip: GetHostByName ($ _ SERVER ['server _ name'])
IP address of the SERVER that receives the request: $ _ SERVER ["SERVER_ADDR"] (sometimes it cannot be obtained. Recommended: GetHostByName ($ _ SERVER ['server _ name'])
Obtain the Client IP Address: $ _ SERVER ['remote _ ADDR ']
Obtain SERVER interpretation engine: $ _ SERVER ['server _ soft']
Obtain the number of SERVER CPUs: $ _ SERVER ['processor _ IDENTIFIER ']
Get the SERVER system directory: $ _ SERVER ['systemroot']
Get SERVER Domain NAME: $ _ SERVER ['server _ name'] (recommended: $ _ SERVER ["HTTP_HOST"])
Get User Domain Name: $ _ SERVER ['userdomain ']
Obtain the SERVER language: $ _ SERVER ['HTTP _ ACCEPT_LANGUAGE ']
Obtain the SERVER Web PORT: $ _ SERVER ['server _ port']
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