小白入门笔记——网站路径server.mappath()
来源:互联网 发布:淘宝店铺收藏的链接 编辑:程序博客网 时间:2024/06/03 15:44
./当前目录
/网站主目录
../上层目录
~/网站虚拟目录
如果当前的网站目录为E:\wwwroot 应用程序虚拟目录为E:\wwwroot\company 浏览的页面路径为E:\wwwroot\company\news\show.asp
在show.asp页面中使用
Server.MapPath("./") 返回路径为:E:\wwwroot\company\news
Server.MapPath("/") 返回路径为:E:\wwwroot
Server.MapPath("../") 返回路径为:E:\wwwroot\company
Server.MapPath("~/") 返回路径为:E:\wwwroot\company
server.MapPath(request.ServerVariables("Path_Info"))
Request.ServerVariables("Path_Translated")
上面两种方式返回路径为 D:\wwwroot\company\news\show.asp
/网站主目录
../上层目录
~/网站虚拟目录
如果当前的网站目录为E:\wwwroot 应用程序虚拟目录为E:\wwwroot\company 浏览的页面路径为E:\wwwroot\company\news\show.asp
在show.asp页面中使用
Server.MapPath("./") 返回路径为:E:\wwwroot\company\news
Server.MapPath("/") 返回路径为:E:\wwwroot
Server.MapPath("../") 返回路径为:E:\wwwroot\company
Server.MapPath("~/") 返回路径为:E:\wwwroot\company
server.MapPath(request.ServerVariables("Path_Info"))
Request.ServerVariables("Path_Translated")
上面两种方式返回路径为 D:\wwwroot\company\news\show.asp
0 0
- 小白入门笔记——网站路径server.mappath()
- 关于 Server.MapPath 路径
- webapi中取文件的物理路径(server.mappath)
- 使用Server.MapPath()获取当前路径
- context.Server.MapPath()出现两个网站名
- Server.MapPath详解(转)
- 小白入门笔记——asp.net mvc框架网站部署
- Server.MapPath()
- Server.MapPath
- Server.MapPath
- Server.MapPath()
- Server.MapPath()
- Server.MapPath
- Server.MapPath(".") Server.MapPath("./") Server.MapPath("/") Server.MapPath用法详解
- server .mappath
- SERVER.MapPath()
- Server.MapPath()
- Server.MapPath()
- 新生排位赛第五场 矩阵快速幂
- 106 背包问题
- twisted日志源码分析
- CoreText.framework --- 段落样子CTParagraphStyle
- POJ1988 Cube Stacking
- 小白入门笔记——网站路径server.mappath()
- hdu 1431 素数回文
- CoreText.framework --- 图文混排
- 108 士兵杀敌(一)
- 虚拟地址转换为物理地址
- -g、-ggdb、-g3和-ggdb3之间的区别
- 大概是个好撒噶哈撒撒看见大家撒看见
- 发达省市地方好撒地方独守空房颠三倒四疯狂的发生口角
- spinlock