惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
I
Intezer
Security Latest
Security Latest
月光博客
月光博客
J
Java Code Geeks
Martin Fowler
Martin Fowler
G
Google Developers Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
博客园 - 三生石上(FineUI控件)
V
V2EX
G
GRAHAM CLULEY
博客园 - 聂微东
NISL@THU
NISL@THU
Scott Helme
Scott Helme
S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
P
Proofpoint News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Engineering at Meta
Engineering at Meta
S
Security @ Cisco Blogs
V
Vulnerabilities – Threatpost
T
Threat Research - Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
Webroot Blog
Webroot Blog
GbyAI
GbyAI
C
Cyber Attacks, Cyber Crime and Cyber Security
Hugging Face - Blog
Hugging Face - Blog
V2EX - 技术
V2EX - 技术
小众软件
小众软件
量子位
爱范儿
爱范儿
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
AI
AI
Jina AI
Jina AI
博客园 - Franky
SecWiki News
SecWiki News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
Hacker News - Newest:
Hacker News - Newest: "LLM"
Stack Overflow Blog
Stack Overflow Blog
T
Troy Hunt's Blog
T
The Exploit Database - CXSecurity.com
博客园_首页

博客园 - 举重-若轻

Survey 2遍的解决办法 Error occurred in deployment step 'Activate Features': Feature with Id 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' is not installed in this farm using powershell to change the some sub-webs' system master page AssetUrlSelector export to excel 用powershell更新user profile service中的一个字段 create a 全局临时表 Generate a random integrater Remote Debugging GAC'd Assemblies in SharePoint get all user profiles redirecting to custom user profile page css的em概念 异步调用的一个例子 .NET种Json时对单引号和特殊字符串的处理 CSS备忘 SharePoint 资料 JSON的客户端和服务器操作 jquery 参考材料 备忘 用powershell更新user的display name
Server.MapPath方法的应用方法
举重-若轻 · 2012-09-17 · via 博客园 - 举重-若轻

Server.MapPath方法的应用方法

老是忘记Server.MapPath的使用方法了,下面记录一下,以备后用:
总注:Server.MapPath获得的路径都是服务器上的物理路径,也就是常说的绝对路径
1、Server.MapPath("/")
注:获得应用程序根目录所在的位置,如 C:\Inetpub\wwwroot\。
2、Server.MapPath("./")
注:获得所在页面的当前目录,等价于Server.MapPath("")。
3、Server.MapPath("../")
注:获得所在页面的上级目录。
4、Server.MapPath("~/")
注:获得当前应用级程序的目录,如果是根目录,就是根目录,如果是虚拟目录,就是虚拟目录所在的位置,如C:\Inetpub\wwwroot\Example\。

Quote from: http://www.cnblogs.com/Showshare/archive/2007/04/23/723965.html