首页 > 学院 > 开发设计 > 正文

Server.MapPath()

2019-11-06 07:18:33
字体:
来源:转载
供稿:网友
 ./当前目录/网站主目录../上层目录~/网站虚拟目录如果当前的网站目录为E:/wwwroot   应用程序虚拟目录为E:/wwwroot/company 浏览的页面路径为E:/wwwroot/company/news/show.asp在show.asp页面中使用Server.MapPath("./")   返回路径为:E:/wwwroot/company/newsServer.MapPath("/")    返回路径为:E:/wwwrootServer.MapPath("../")   返回路径为:E:/wwwroot/companyServer.MapPath("~/")   返回路径为:E:/wwwroot/companyserver.MapPath(request.ServerVariables("Path_Info")) Request.ServerVariables("Path_Translated")  上面两种方式返回路径为 D:/wwwroot/company/news/show.asp
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表