对 Server.MapPath 的说明
1。IIS的根目录==>c:\inetpub\wwwroot
2。虚拟目录"oas"==>F:\hskama\oas
3。在http://localhost/oas/sys/others/mkm.aspx执行Response.Write(XXX)
2。虚拟目录"oas"==>F:\hskama\oas
3。在http://localhost/oas/sys/others/mkm.aspx执行Response.Write(XXX)
结果:
Server.MapPath(".") F:\hskama\oas\sys\others
Server.MapPath("~") F:\hskama\oas
Server.MapPath("") F:\hskama\oas\sys\others
Server.MapPath("..") F:\hskama\oas\sys
Server.MapPath("~/..") c:\inetpub\wwwroot

浙公网安备 33010602011771号