ASP.NET中关于路径的那些事
来源:互联网 发布:农业部渔船数据科 编辑:程序博客网 时间:2024/05/17 03:24
./当前目录
/网站主目录
../上层目录
~/网站虚拟目录
如果当前的网站目录为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
- ASP.NET中关于路径的那些事
- 关于FCKeditor用于asp.net中,图片路径的设置
- [NET]关于在ASP.NET中物理路径和虚拟路径的取得
- 关于在ASP.NET中物理路径和虚拟路径的取得
- 关于在ASP.NET中物理路径和虚拟路径的取得
- 关于在ASP.NET中物理路径和虚拟路径的取得
- 关于文件路径的那些事
- asp.net 中图片的路径问题
- ASP.NET中相对路径的总结
- ASP.NET 字符编码的那些事
- ASP.NET的“~”路径
- 关于asp.net无法访问UNC路径文件的解决
- 关于asp.net无法访问UNC路径文件的解决
- 关于asp.net无法访问UNC路径文件的解决
- ASP.NET那些事(一)
- 关于Asp.net中Cookie的问题
- 关于Asp.net中Cookie的问题
- Asp.net中关于Cookie的操作
- poj 3258 River Hopscotch (二分搜索---最大化最小值)
- 0,"0",undefined,null,false在JS中的判断方式
- Linux启动ftp服务器530 Permission denied解决方法
- 个人开公司的流程——以后可能用得着
- iOS笔记-- 多线程应该知道的那几件事 GCD NSThread NSOperation
- ASP.NET中关于路径的那些事
- google guava bloom filter包的坑
- 技术牛人---章文嵩博士---做系统要先了解业务的需求
- 抬脚第一挪
- 例说模板方法模式(Template Method Pattern)
- 实现画图板的基本框架与界面
- Code Sign error: Application Identifier 'xxx' which doesn't match the current setting 'xxx'
- sizeof()用法汇总
- JNI