数字报软件制作,电子报制作发布软件论坛数字报与报纸数字化论坛数字报站长交流 → PHP:_SERVER变量和_ENV变量列表


  共有15153人关注过本帖树形打印复制链接

主题:PHP:_SERVER变量和_ENV变量列表

帅哥哟,离线,有人找我吗?
cocoteche
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:43 积分:661 威望:0 精华:-5 注册:2011/10/11 11:40:47
PHP:_SERVER变量和_ENV变量列表  发帖心情 Post By:2013/1/6 10:16:56 [只看该作者]

可以实用 _SERVER变量和_ENV变量
下面是我的phpinfo中的php变量:

_SERVER["SCRIPT_NAME"]          /php/index.php
_SERVER["HTTP_COOKIE"]          cdb_sid=tcSZ7o
_SERVER["AUTH_PASSWORD"]        no value
_SERVER["AUTH_TYPE"]            no value
_SERVER["AUTH_USER"]            no value
_SERVER["CONTENT_LENGTH"]       0
_SERVER["CONTENT_TYPE"]         no value
_SERVER["PATH_TRANSLATED"]      c:\inetpub\wwwroot
_SERVER["QUERY_STRING"]        (url中问号后边的部分)
_SERVER["REMOTE_ADDR"]          127.0.0.1
_SERVER["REMOTE_HOST"]          127.0.0.1
_SERVER["REMOTE_USER"]          no value
_SERVER["REQUEST_METHOD"]       GET
_SERVER["SERVER_NAME"]          localhost
_SERVER["SERVER_PORT"]          80
_SERVER["SERVER_PROTOCOL"]      HTTP/1.1
_SERVER["SERVER_SOFTWARE"]      Microsoft-IIS/6.0
_SERVER["APPL_MD_PATH"]         /LM/W3SVC/1/Root/php
_SERVER["APPL_PHYSICAL_PATH"]   E:\web\php\
_SERVER["INSTANCE_ID"]          1
_SERVER["INSTANCE_META_PATH"]   /LM/W3SVC/1
_SERVER["LOGON_USER"]           no value
_SERVER["REQUEST_URI"]          /php/index.php
_SERVER["URL"]                  /php/index.php
_SERVER["SCRIPT_FILENAME"]      E:\web\php\index.php
_SERVER["ORIG_PATH_INFO"]       /php/index.php
_SERVER["PATH_INFO"]            no value
_SERVER["ORIG_PATH_TRANSLATED"]    E:\web\php\index.php
_SERVER["DOCUMENT_ROOT"]        c:\inetpub\wwwroot
_SERVER["PHP_SELF"]             /php/index.php
_SERVER["HTTP_CONNECTION"]      keep-alive
_SERVER["HTTP_KEEP_ALIVE"]      300

_SERVER["HTTP_HOST"]            localhost
_SERVER["HTTP_USER_AGENT"]      Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
_SERVER["REQUEST_TIME"]         1146214357
_SERVER["argv"]

Array
(
)

_SERVER["argc"]                          0
_ENV["ALLUSERSPROFILE"]                  C:\Documents and Settings\All Users
_ENV["ClusterLog"]                       C:\WINDOWS\Cluster\cluster.log
_ENV["CommonProgramFiles"]               C:\Program Files\Common Files
_ENV["COMPUTERNAME"]                     LIUBO
_ENV["ComSpec"]                          C:\WINDOWS\system32\cmd.exe
_ENV["FP_NO_HOST_CHECK"]                 NO
_ENV["NUMBER_OF_PROCESSORS"]             1
_ENV["OS"]                               Windows_NT
_ENV["Path"]                             C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;E:\Program Files\MySQL\MySQL Server 5.0\bin;c:\php;c:\php\ext
_ENV["PATHEXT"]                          .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_ENV["PROCESSOR_ARCHITECTURE"]           x86
_ENV["PROCESSOR_IDENTIFIER"]             x86 Family 15 Model 4 Stepping 1, GenuineIntel
_ENV["PROCESSOR_LEVEL"]                  15
_ENV["PROCESSOR_REVISION"]               0401
_ENV["ProgramFiles"]                     C:\Program Files
_ENV["SystemDrive"]                      C:
_ENV["SystemRoot"]                       C:\WINDOWS
_ENV["TEMP"]                             d:\
_ENV["TMP"]                              d:\
_ENV["USERPROFILE"]                      C:\Documents and Settings\Default User
_ENV["windir"]                           C:\WINDOWS

相信很容易能看懂的,如果还有不懂,可以查php手册

选购xpaper数字报好礼不断 xpaper数字报
 回到顶部