$_server[]关于浏览器和服务器的参数获取

$_SERVER[‘USER‘]    www
$_SERVER[‘HOME‘]    /home/www
$_SERVER[‘HTTP_UPGRADE_INSECURE_REQUESTS‘]    1
$_SERVER[‘HTTP_CONNECTION‘]    keep-alive
$_SERVER[‘HTTP_ACCEPT_ENCODING‘]    gzip, deflate
$_SERVER[‘HTTP_ACCEPT_LANGUAGE‘]    en-US,en;q=0.5
$_SERVER[‘HTTP_ACCEPT‘]    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
$_SERVER[‘HTTP_USER_AGENT‘]    Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
$_SERVER[‘HTTP_HOST‘]    localhost
$_SERVER[‘PHP_ADMIN_VALUE‘]    open_basedir=/home/wwwroot/default/:/tmp/:/proc/
$_SERVER[‘REDIRECT_STATUS‘]    200
$_SERVER[‘SERVER_NAME‘]    _
$_SERVER[‘SERVER_PORT‘]    80
$_SERVER[‘SERVER_ADDR‘]    127.0.0.1
$_SERVER[‘REMOTE_PORT‘]    44936
$_SERVER[‘REMOTE_ADDR‘]    127.0.0.1
$_SERVER[‘SERVER_SOFTWARE‘]    nginx/1.12.0
$_SERVER[‘GATEWAY_INTERFACE‘]    CGI/1.1
$_SERVER[‘REQUEST_SCHEME‘]    http
$_SERVER[‘SERVER_PROTOCOL‘]    HTTP/1.1
$_SERVER[‘DOCUMENT_ROOT‘]    /home/wwwroot/default
$_SERVER[‘DOCUMENT_URI‘]    /phpinfo.php
$_SERVER[‘REQUEST_URI‘]    /phpinfo.php
$_SERVER[‘SCRIPT_NAME‘]    /phpinfo.php
$_SERVER[‘CONTENT_LENGTH‘]    no value
$_SERVER[‘CONTENT_TYPE‘]    no value
$_SERVER[‘REQUEST_METHOD‘]    GET
$_SERVER[‘QUERY_STRING‘]    no value
$_SERVER[‘SCRIPT_FILENAME‘]    /home/wwwroot/default/phpinfo.php
$_SERVER[‘FCGI_ROLE‘]    RESPONDER
$_SERVER[‘PHP_SELF‘]    /phpinfo.php
$_SERVER[‘REQUEST_TIME_FLOAT‘]    1497664821.1267
$_SERVER[‘REQUEST_TIME‘]    1497664821

今天安装redis扩展看到这些东西,做了下笔记,想获取浏览器和服务器的信息就靠他们了

时间: 2024-10-12 13:40:16