关于Server.MapPath()

 Server.MapPath("~/");

//返回网站的根目录 如:E:\RisingInfo.Root\RisingInfo\RisingInfo

 Server.MapPath("");  

//返回当前页面的目录 如:E:\RisingInfo.Root\RisingInfo\RisingInfo\MSG\Stat

Server.MapPath(".")与Server.MapPath("")一样

//返回当前页面的目录 如  E:\RisingInfo.Root\RisingInfo\RisingInfo\MSG\Stat

Server.MapPath("./")

//返回当前页面的目录(带'\') 如  E:\RisingInfo.Root\RisingInfo\RisingInfo\MSG\Stat\

 Server.MapPath("../")

//返回当前页面目录的上级目录 如:E:\RisingInfo.Root\RisingInfo\RisingInfo\MSG\ 

 Server.MapPath("..")

//返回当前页面目录的上级目录(不带'\') 如E:\RisingInfo.Root\RisingInfo\RisingInfo\MSG

 

posted on 2008-07-31 17:36  liuhaitao  阅读(248)  评论(0编辑  收藏  举报

导航