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

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

博客园 - 张少峰

在linuxdeepin10.12下源码安装bochs-2.4.6 设置pppoe时遇到“Oh, dear, I don't see the file '/etc/ppp/pppoe.conf' anywhere.”时的解决方法 安装ubuntu10.10时遇到ubi partman crashed,ubi-partman failed with exit code 141的解决方案 糗事的教训:做事一定要细心细心再细心 Reflector插件FileDisassembler汉化修改版 解压用Sixxpack2.2压缩过的程序,拿原始程序集 - 张少峰 - 博客园 利用网页挂马拿服务器的一种设想 第一次上首页,发一个玩具级的持久化工具~ python一些细微的东西 IndentationError: unindent does not match any outer indentation level 一个方法返回多个值的解决方法 值类型与引用类型 用反射把程序集中一些泛型类实例化,怎么确定实例的类型? 父类实现IComparable<T>接口,子类无法使用~ [转载]谓词和操作(c#版) 静态变量的继承 XPath初学笔记(四) XPath初学笔记(三) XPath初学笔记(二)
Request的几种路径属性
张少峰 · 2008-11-27 · via 博客园 - 张少峰

说明懒得写。直接代码~

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">


    protected 
void Page_Load(object sender, EventArgs e)
    
{
        Response.Write(
"<center><h1>Request的几种路径属性</h1></center><br />");
        Response.Write(
"<font color=blue>服务器上 ASP.NET 应用程序的虚拟应用程序根路径</font>(<font color=green>ApplicationPath</font>):<font color=red>" + Request.ApplicationPath + "</font><br />");
        Response.Write(
"<font color=blue>应用程序根的虚拟路径,并通过对应用程序根使用波形符表示法使该路径成为相对路径(<font color=green>AppRelativeCurrentExecutionFilePath</font>):</font><font color=red>" + Request.AppRelativeCurrentExecutionFilePath + "</font><br />");

        Response.Write(
"<font color=blue>当前请求的虚拟路径</font>(<font color=green>CurrentExecutionFilePath</font>):<font color=red>" + Request.CurrentExecutionFilePath + "</font><br />");
        Response.Write(
"<font color=blue>当前请求的虚拟路径</font>(<font color=green>FilePath</font>):<font color=red>" + Request.FilePath + "</font><br />");

        Response.Write(
"<font color=blue>当前请求的虚拟路径</font>(<font color=green>Path</font>):<font color=red>" + Request.Path + "</font><br />");
        Response.Write(
"<font color=blue>具有 URL 扩展名的资源的附加路径信息</font>(<font color=green>PathInfo</font>):<font color=red>" + Request.PathInfo + "</font><br />");
        Response.Write(
"<font color=blue>当前正在执行的服务器应用程序的根目录的物理文件系统路径</font>(<font color=green>PhysicalApplicationPath</font>):<font color=red>" + Request.PhysicalApplicationPath + "</font><br />");
        Response.Write(
"<font color=blue>与请求的 URL 相对应的物理文件系统路径</font>(<font color=green>PhysicalPath</font>):<font color=red>" + Request.PhysicalPath + "</font><br />");
        Response.Write(
"<font color=blue>获取当前请求的原始 URL</font>(<font color=green>RawUrl</font>):<font color=red>" + Request.RawUrl + "</font><br />");

        Response.Write(
"<font color=blue>有关当前请求的 URL 的信息</font>(<font color=green>Url</font>):<font color=red>" + Request.Url + "</font><br />");
        Response.Write(
"<font color=blue>有关客户端上次请求的 URL 的信息,该请求链接到当前的 URL</font>(<font color=green>UrlReferrer</font>):<font color=red>" + Request.UrlReferrer + "</font><br />");
       
    }

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    
<title>无标题页</title>
</head>
<body>
    
<form id="form1" runat="server">
    
<div>
        
<asp:Button ID="Button1" runat="server" Text="Post" /></div>
    
</form>
</body>
</html>

运行结果: