狀態(tài): 1。IIS的根目錄==>c:\inetpub\wwwroot 2。虛擬目錄"oas"==>F:\hskama\oas 3。在http://localhost/oas/sys/others/mkm.aspx執(zhí)行Response.Write(XXX)
結(jié)果: 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
我覺得這個(gè)實(shí)驗(yàn)很有意思,雖然是一些簡(jiǎn)單的東西,但是我覺得對(duì)于以后項(xiàng)目的開發(fā)會(huì)很有意義,甚至覺得這有點(diǎn)類似于寫SQL語(yǔ)句,其精妙之處值得細(xì)細(xì)體會(huì)。所以才把他寫下來(lái)。
|