robots
软件开发,软件定制,网站制作,网店定制
点击给我发消息
您的位置:网站首页 > 技术文章 > PHP技术

遍例$_SERVER中的服务器变量

作者:admin 来源:未知 日期:2010-1-24 0:30:23 人气: 标签:
导读:$val){echo "$key:$val";}?>HTTP_ACCEPT:application/x-shockwave-flash, image/gif, image/x-xbi

<?php
foreach($_SERVER as $key=>$val){
  echo "$key:<font color=blue>$val</font><br>";
}
?>

HTTP_ACCEPT:application/x-shockwave-flash, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
HTTP_ACCEPT_LANGUAGE:zh-cn
HTTP_UA_CPU:x86
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; GreenBrowser)
HTTP_HOST:localhost
HTTP_CONNECTION:Keep-Alive
HTTP_COOKIE:SQLiteManager_currentTheme=green; SQLiteManager_currentLangue=13; PHPSESSID=fgffore19cf4mbg389oc9k7t86
PATH:C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\
SystemRoot:C:\WINDOWS
COMSPEC:C:\WINDOWS\system32\cmd.exe
PATHEXT:.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
WINDIR:C:\WINDOWS
SERVER_SIGNATURE:
SERVER_SOFTWARE:Apache/2.2.8 (Win32) PHP/5.2.6
SERVER_NAME:localhost
SERVER_ADDR:127.0.0.1
SERVER_PORT:80
REMOTE_ADDR:127.0.0.1
DOCUMENT_ROOT:E:/wamp/www/
SERVER_ADMIN:admin@localhost
SCRIPT_FILENAME:E:/wamp/www/mycms/getServer.php
REMOTE_PORT:4135
GATEWAY_INTERFACE:CGI/1.1
SERVER_PROTOCOL:HTTP/1.1
REQUEST_METHOD:GET
QUERY_STRING:id=32
REQUEST_URI:/mycms/getServer.php?id=32
SCRIPT_NAME:/mycms/getServer.php
PHP_SELF:/mycms/getServer.php
REQUEST_TIME:1264261652

共有:条评论信息评论信息
发表评论
姓 名:
验证码: