iis7 php $_request 结果为null,PHP :: Bug #64272 :: IIS7开启rewrite时Yaf_Request无法正确获取请求URI...

[2013-02-26 02:57 UTC] wynn dot chen dot cn at gmail dot com

感谢您的快速回应。

并没有$_SERVER['PATH_INFO']这一项。

在我的开发环境下,访问:

http://www.mytest.com/path/path2/path3/abc/

得到的$_SERVER实际信息如下:

//var_dump($_SERVER);

array(92) {

["PROCESSOR_ARCHITEW6432"]=>

string(5) "AMD64"

["_FCGI_X_PIPE_"]=>

string(53) "\\.\pipe\IISFCGI-754ba21e-a52b-4e85-8573-8e4a36086c81"

["ALLUSERSPROFILE"]=>

string(14) "C:\ProgramData"

["APPDATA"]=>

string(56) "C:\Windows\system32\config\systemprofile\AppData\Roaming"

["APP_POOL_CONFIG"]=>

string(39) "C:\inetpub\temp\apppools\dpc\dpc.config"

["APP_POOL_ID"]=>

string(3) "dpc"

["CommonProgramFiles"]=>

string(35) "C:\Program Files (x86)\Common Files"

["CommonProgramFiles(x86)"]=>

string(35) "C:\Program Files (x86)\Common Files"

["CommonProgramW6432"]=>

string(29) "C:\Program Files\Common Files"

["COMPUTERNAME"]=>

string(7) "OFFICE-PC"

["ComSpec"]=>

string(27) "C:\Windows\system32\cmd.exe"

["FP_NO_HOST_CHECK"]=>

string(2) "NO"

["LOCALAPPDATA"]=>

string(54) "C:\Windows\system32\config\systemprofile\AppData\Local"

["NUMBER_OF_PROCESSORS"]=>

string(1) "4"

["OS"]=>

string(10) "Windows_NT"

["Path"]=>

string(295) "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\php;C:\Program Files\TortoiseSVN\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ImageMagick-6.8.1-Q16;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\lua\bin;"

["PATHEXT"]=>

string(53) ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"

["PROCESSOR_ARCHITECTURE"]=>

string(3) "x86"

["PROCESSOR_IDENTIFIER"]=>

string(50) "Intel64 Family 6 Model 42 Stepping 7, GenuineIntel"

["PROCESSOR_LEVEL"]=>

string(1) "6"

["PROCESSOR_REVISION"]=>

string(4) "2a07"

["ProgramData"]=>

string(14) "C:\ProgramData"

["ProgramFiles"]=>

string(22) "C:\Program Files (x86)"

["ProgramFiles(x86)"]=>

string(22) "C:\Program Files (x86)"

["ProgramW6432"]=>

string(16) "C:\Program Files"

["PSModulePath"]=>

string(51) "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\"

["PUBLIC"]=>

string(15) "C:\Users\Public"

["SystemDrive"]=>

string(2) "C:"

["SystemRoot"]=>

string(10) "C:\Windows"

["TEMP"]=>

string(15) "C:\Windows\TEMP"

["TMP"]=>

string(15) "C:\Windows\TEMP"

["USERDOMAIN"]=>

string(9) "WORKGROUP"

["USERNAME"]=>

string(8) "OFFICE-PC$"

["USERPROFILE"]=>

string(40) "C:\Windows\system32\config\systemprofile"

["windir"]=>

string(10) "C:\Windows"

["ORIG_PATH_INFO"]=>

string(10) "/index.php"

["URL"]=>

string(10) "/index.php"

["SERVER_SOFTWARE"]=>

string(17) "Microsoft-IIS/7.5"

["SERVER_PROTOCOL"]=>

string(8) "HTTP/1.1"

["SERVER_PORT_SECURE"]=>

string(1) "0"

["SERVER_PORT"]=>

string(2) "80"

["SERVER_NAME"]=>

string(14) "www.mytest.com"

["SCRIPT_NAME"]=>

string(10) "/index.php"

["SCRIPT_FILENAME"]=>

string(23) "D:\dpc\public\index.php"

["REQUEST_URI"]=>

string(22) "/path/path2/path3/abc/"

["REQUEST_METHOD"]=>

string(3) "GET"

["REMOTE_USER"]=>

string(0) ""

["REMOTE_PORT"]=>

string(5) "63841"

["REMOTE_HOST"]=>

string(14) "192.168.100.99"

["REMOTE_ADDR"]=>

string(14) "192.168.100.99"

["QUERY_STRING"]=>

string(0) ""

["PATH_TRANSLATED"]=>

string(23) "D:\dpc\public\index.php"

["LOGON_USER"]=>

string(0) ""

["LOCAL_ADDR"]=>

string(14) "192.168.100.99"

["INSTANCE_META_PATH"]=>

string(11) "/LM/W3SVC/3"

["INSTANCE_NAME"]=>

string(3) "DPC"

["INSTANCE_ID"]=>

string(1) "3"

["HTTPS_SERVER_SUBJECT"]=>

string(0) ""

["HTTPS_SERVER_ISSUER"]=>

string(0) ""

["HTTPS_SECRETKEYSIZE"]=>

string(0) ""

["HTTPS_KEYSIZE"]=>

string(0) ""

["HTTPS"]=>

string(3) "off"

["GATEWAY_INTERFACE"]=>

string(7) "CGI/1.1"

["DOCUMENT_ROOT"]=>

string(13) "D:\dpc\public"

["CONTENT_TYPE"]=>

string(0) ""

["CONTENT_LENGTH"]=>

string(1) "0"

["CERT_SUBJECT"]=>

string(0) ""

["CERT_SERIALNUMBER"]=>

string(0) ""

["CERT_ISSUER"]=>

string(0) ""

["CERT_FLAGS"]=>

string(0) ""

["CERT_COOKIE"]=>

string(0) ""

["AUTH_USER"]=>

string(0) ""

["AUTH_PASSWORD"]=>

string(0) ""

["AUTH_TYPE"]=>

string(0) ""

["APPL_PHYSICAL_PATH"]=>

string(14) "D:\dpc\public\"

["APPL_MD_PATH"]=>

string(16) "/LM/W3SVC/3/ROOT"

["IIS_UrlRewriteModule"]=>

string(10) "7.1.0871.0"

["UNENCODED_URL"]=>

string(22) "/path/path2/path3/abc/"

["IIS_WasUrlRewritten"]=>

string(1) "1"

["HTTP_X_ORIGINAL_URL"]=>

string(22) "/path/path2/path3/abc/"

["HTTP_DNT"]=>

string(1) "1"

["HTTP_USER_AGENT"]=>

string(72) "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0"

["HTTP_HOST"]=>

string(14) "www.mytest.com"

["HTTP_ACCEPT_LANGUAGE"]=>

string(35) "zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3"

["HTTP_ACCEPT_ENCODING"]=>

string(13) "gzip, deflate"

["HTTP_ACCEPT"]=>

string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"

["HTTP_CONTENT_LENGTH"]=>

string(1) "0"

["HTTP_CONNECTION"]=>

string(10) "keep-alive"

["FCGI_ROLE"]=>

string(9) "RESPONDER"

["PHP_SELF"]=>

string(10) "/index.php"

["REQUEST_TIME_FLOAT"]=>

float(1361847112.2165)

["REQUEST_TIME"]=>

int(1361847112)

}

希望以上信息能有帮助。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值