$root = getenv (' Document_root '); Server Document root directory
$port = getenv (' Server_port '); Server port
$file = getenv (' Script_name '); Current execution file
$ua = getenv (' http_user_agent '); User UA
$method = getenv (' Request_method '); Request method
$protocol = getenv (' Server_protocol '); Transport protocol
Getmypid (),////returns the process ID number of the current PHP process, which does not require input parameters.
Get_current_user (),////returns the owner name of the current program, and the function does not require input parameters.
Copy Code code as follows:
Get system type and version number: Php_uname () (Example: Windows NT COMPUTER 5.1 build 2600)
Get system type only: Php_uname (' s ') (or: Php_os, example: Windows NT)
Get System version number only: Php_uname (' R ') (example: 5.1)
Get PHP Run Mode: php_sapi_name () (PHP run Mode:apache2handler)
Get previous process user name: Get_current_user ()
Get PHP version: Php_version
Get Zend Version: Zend_version ()
Get the PHP installation path: Default_include_path
Get the current file absolute path: __file__
Get HOST value in HTTP request: $_server["Http_host" (return value is domain name or IP)
Get Server Ip:gethostbyname ($_server[' server_name ')
Server IP receiving Request: $_server["SERVER_ADDR"] (sometimes not available, recommended: gethostbyname ($_server[' server_name '))
Get client IP: $_server[' REMOTE_ADDR ']
Get server Interpretation Engine: $_server[' Server_software ']
Get Server CPU Number: $_server[' processor_identifier ']
Get Server System directory: $_server[' SystemRoot ']
Get Server domain name: $_server[' server_name '] (recommended: $_server["Http_host"])
Get user domain name: $_server[' UserDomain ']
Get the server language: $_server[' http_accept_language ']
Get Server Web port: $_server[' Server_port ']