Request.php query stringString

页面导航:
→ 正文内容 HttpRequest的QueryString属性
HttpRequest的QueryString属性 的一点认识
我们开发asp.net程序获取QueryString时,经常性的遇到一些url编码问题
如: 当然我们一般都是按照提示来把framework版本设置2.0来解决。为什么可以这么解决了,还有没有其它的解决方法了。 先让我们看看QueryString的源代码吧:
代码如下: public NameValueCollection QueryString { get { if (this._queryString == null) { this._queryString = new HttpValueCollection(); if (this._wr != null) { this.FillInQueryStringCollection(); } this._queryString.MakeReadOnly(); } if (this._flags[1]) { this._flags.Clear(1); this.ValidateNameValueCollection(this._queryString, RequestValidationSource.QueryString); } return this._queryS } } private void FillInQueryStringCollection() { byte[] queryStringBytes = this.QueryStringB if (queryStringBytes != null) { if (queryStringBytes.Length != 0) { this._queryString.FillFromEncodedBytes(queryStringBytes, this.QueryStringEncoding); } } else if (!string.IsNullOrEmpty(this.QueryStringText)) { this._queryString.FillFromString(this.QueryStringText, true, this.QueryStringEncoding); } }
  先让我们插入一点 那就是QueryString默认已经做了url解码。 其中HttpValueCollection的 FillFromEncodedBytes方法如下
代码如下: internal void FillFromEncodedBytes(byte[] bytes, Encoding encoding) { int num = (bytes != null) ? bytes.Length : 0; for (int i = 0; i & i++) {
string str2; this.ThrowIfMaxHttpCollectionKeysExceeded(); int offset = int num4 = -1; while (i & num) { byte num5 = bytes[i]; if (num5 == 0x3d) { if (num4 & 0) { num4 = } } else if (num5 == 0x26) {
} i++; } if (num4 &= 0) { str = HttpUtility.UrlDecode(bytes, offset, num4 - offset, encoding); str2 = HttpUtility.UrlDecode(bytes, num4 + 1, (i - num4) - 1, encoding); } else { str = str2 = HttpUtility.UrlDecode(bytes, offset, i - offset, encoding); } base.Add(str, str2); if ((i == (num - 1)) && (bytes[i] == 0x26)) { base.Add(null, string.Empty); } } }
从这里我们可以看到QueryString已经为我们做了解码工作,我们不需要写成 HttpUtility.HtmlDecode(Request.QueryString["xxx"])而是直接写成Request.QueryString["xxx"]就ok了。 现在让我们来看看你QueryString的验证,在代码中有
代码如下: if (this._flags[1]) { this._flags.Clear(1); this.ValidateNameValueCollection(this._queryString, RequestValidationSource.QueryString); }
一看this.ValidateNameValueCollection这个方法名称就知道是干什么的了,验证QueryString数据;那么在什么情况下验证的了? 让我们看看this._flags[1]在什么地方设置的:
代码如下: public void ValidateInput() { if (!this._flags[0x8000]) { this._flags.Set(0x8000); this._flags.Set(1); this._flags.Set(2); this._flags.Set(4); this._flags.Set(0x40); this._flags.Set(0x80); this._flags.Set(0x100); this._flags.Set(0x200); this._flags.Set(8); } }
  而该方法在ValidateInputIfRequiredByConfig中调用,调用代码
代码如下: internal void ValidateInputIfRequiredByConfig() { ......... if (httpRuntime.RequestValidationMode &= VersionUtil.Framework40) { this.ValidateInput(); } }
我想现在大家都应该明白为什么错题提示让我们把framework改为2.0了吧。应为在4.0后才验证。这种解决问题的方法是关闭验证,那么我们是否可以改变默认的验证规则了? 让我们看看ValidateNameValueCollection
代码如下: private void ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) { int count = nvc.C for (int i = 0; i & i++) { string key = nvc.GetKey(i); if ((key == null) || !key.StartsWith("__", StringComparison.Ordinal)) { string str2 = nvc.Get(i); if (!string.IsNullOrEmpty(str2)) { this.ValidateString(str2, key, requestCollection); } } } } private void ValidateString(string value, string collectionKey, RequestValidationSource requestCollection) {
value = RemoveNullCharacters(value); if (!RequestValidator.Current.IsValidRequestString(this.Context, value, requestCollection, collectionKey, out num)) { string str = collectionKey + "=\""; int startIndex = num - 10; if (startIndex &= 0) { startIndex = 0; } else { str = str + "..."; } int length = num + 20; if (length &= value.Length) { length = value.L str = str + value.Substring(startIndex, length - startIndex) + "\""; } else { str = str + value.Substring(startIndex, length - startIndex) + "...\""; } string requestValidationSourceName = GetRequestValidationSourceName(requestCollection); throw new HttpRequestValidationException(SR.GetString("Dangerous_input_detected", new object[] { requestValidationSourceName, str })); } }      哦?原来一切都明白了,验证是在RequestValidator做的。
代码如下: public class RequestValidator { // Fields private static RequestValidator _customV private static readonly Lazy&RequestValidator& _customValidatorResolver = new Lazy&RequestValidator&(new Func&RequestValidator&(RequestValidator.GetCustomValidatorFromConfig)); // Methods private static RequestValidator GetCustomValidatorFromConfig() { HttpRuntimeSection httpRuntime = RuntimeConfig.GetAppConfig().HttpR Type userBaseType = ConfigUtil.GetType(httpRuntime.RequestValidationType, "requestValidationType", httpRuntime); ConfigUtil.CheckBaseType(typeof(RequestValidator), userBaseType, "requestValidationType", httpRuntime); return (RequestValidator) HttpRuntime.CreatePublicInstance(userBaseType); } internal static void InitializeOnFirstRequest() { RequestValidator local1 = _customValidatorResolver.V } private static bool IsAtoZ(char c) { return (((c &= 'a') && (c &= 'z')) || ((c &= 'A') && (c &= 'Z'))); } protected internal virtual bool IsValidRequestString(HttpContext context, string value, RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) { if (requestValidationSource == RequestValidationSource.Headers) { validationFailureIndex = 0;
} return !CrossSiteScriptingValidation.IsDangerousString(value, out validationFailureIndex); } // Properties public static RequestValidator Current { get { if (_customValidator == null) { _customValidator = _customValidatorResolver.V } return _customV } set { if (value == null) { throw new ArgumentNullException("value"); } _customValidator = } } } 
主要的验证方法还是在CrossSiteScriptingValidation.IsDangerousString(value, out validationFailureIndex);而CrossSiteScriptingValidation是一个内部类,无法修改。 让我们看看CrossSiteScriptingValidation类大代码把
代码如下: internal static class CrossSiteScriptingValidation { // Fields private static char[] startingChars = new char[] { '&', '&' }; // Methods private static bool IsAtoZ(char c) { return (((c &= 'a') && (c &= 'z')) || ((c &= 'A') && (c &= 'Z'))); } internal static bool IsDangerousString(string s, out int matchIndex) { matchIndex = 0; int startIndex = 0; while (true) { int num2 = s.IndexOfAny(startingChars, startIndex); if (num2 & 0) {
} if (num2 == (s.Length - 1)) {
} matchIndex = num2; char ch = s[num2]; if (ch != '&') { if ((ch == '&') && ((IsAtoZ(s[num2 + 1]) || (s[num2 + 1] == '!')) || ((s[num2 + 1] == '/') || (s[num2 + 1] == '?')))) {
} } else if (s[num2 + 1] == '#') {
} startIndex = num2 + 1; } } internal static bool IsDangerousUrl(string s) { if (string.IsNullOrEmpty(s)) {
} s = s.Trim(); int length = s.L if (((((length & 4) && ((s[0] == 'h') || (s[0] == 'H'))) && ((s[1] == 't') || (s[1] == 'T'))) && (((s[2] == 't') || (s[2] == 'T')) && ((s[3] == 'p') || (s[3] == 'P')))) && ((s[4] == ':') || (((length & 5) && ((s[4] == 's') || (s[4] == 'S'))) && (s[5] == ':')))) {
} if (s.IndexOf(':') == -1) {
} internal static bool IsValidJavascriptId(string id) { if (!string.IsNullOrEmpty(id)) { return CodeGenerator.IsValidLanguageIndependentIdentifier(id); }
  结果我们发现&# &! &/ &? &[a-zA-z] 这些情况验证都是通不过的。 所以我们只需要重写RequestValidator就可以了。 例如我们现在需要处理我们现在需要过滤QueryString中k=&...的情况
代码如下: public class CustRequestValidator : RequestValidator { protected override bool IsValidRequestString(HttpContext context, string value, RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) { validationFailureIndex = 0; //我们现在需要过滤QueryString中k=&...的情况 if (requestValidationSource == RequestValidationSource.QueryString&&collectionKey.Equals("k")&& value.StartsWith("&")) {
} return base.IsValidRequestString(context, value, requestValidationSource, collectionKey, out validationFailureIndex); } }   &httpRuntime requestValidationType="MvcApp.CustRequestValidator"/&
个人在这里只是提供一个思想,欢迎大家拍砖!
您可能感兴趣的文章:
上一篇:下一篇:
最 近 更 新
热 点 排 行
12345678910ASP.NET 4.0 設定 了 validateRequest="false" 仍然會出現 具有潛在危險 Request.QueryString 的錯誤訊息 - PIN- 點部落
文章數(34) 回應數(39) 引用數(0)
閱讀數 : 17474
| 文章分類 :
微軟的asp.net網頁都會預設進行Request Validation,但若是想規避這樣的內建行為。(建議仍要有其他的方法來防範XSS攻擊) 通常我們可以在.aspx中的Page Tag設定: &@Page Language="C#" validateRequest="False" &或是直接對整個站台設定Web.Config中
&system.web&下設定全域的&pages validateRequest="false" /&
不過,假如你現在在ASP.NET 4.0 的環境下的話,就算進行上述的設定,可能仍會出現驗證失敗的訊息(潛在危險Request.QueryString的錯誤訊息)因為ASP.NET4.0與2.0版本在請求驗證的定義上已經有所不同: ASP.NET Request Validation請求驗證是ASP.NET提供來保護XSS攻擊的一項功能在先前的ASP.NET(ASP.NET 2.0)網頁,都是預設會進行網頁請求的請求驗證僅會針對.aspx以及他們的class檔案進行驗證不過到了ASP.NET 4.0,請求驗證範圍擴大到所有的請求因為從BeginRequest階段就開始了HttpRequest因此在這個期間任何的資源要求都會進行請求驗證而非網頁檔案(.aspx)而已,還包含WebService呼叫以及自訂的http Handlers,都會去驗證http請求的內容因此在ASP.NET 4.0下,可能在非網頁請求的情況下,仍會發生請求驗證錯誤的訊息這時為了避免這樣的問題,一樣在Web.Config中 &system.web&下加入下列語句&httpRuntime requestValidationMode="2.0" /&這樣就可以讓請求驗證只焦點在.aspx網頁上了。 其他關於ASP.NET 4.0 請求驗證的應用方法:
目前沒有回應.
Remember Me?您当前所在位置:&>>&&>>&正文
在MVC中如何获取Request.QueryString中的参数值的方法
创建时间:日 08:56阅读次数:(31486)
今天在MVC中,试图用Request.QueryString["type"]取到URL中参数type的值,却发现怎么也取不值。仔细检查我的路由配置:public&static&void&RegisterRoutes(RouteCollection&routes){routes.IgnoreRoute("{resource}.axd/{*pathInfo}");routes.MapRoute("Default",&//&路由名称"{controller}/{action}/{id}/{type}",&//&带有参数的&URLnew{controller&=&"Home",action&=&"Index",id&=&UrlParameter.Optional,type=&UrlParameter.Optional}&//&参数默认值);}虽说有稍许的改动,但也没有错误,URL也是能正确解析。调试到程序中测试,发现不管怎么弄,Request.QueryString.Count总是等于0,也就是说,Request.QueryString中一直没有值,唉~崩溃了。经过一上午的努力,终于是找到了问题的解决方法,我们可以通过以下两种方法来获取到URL中参数的值,但为什么Request.QueryString取不到值的具体原因不知道,什么情况下Request.QueryString才会有值等也不清楚,Asp.MVC本人也没有深究,只是想多了解一些asp.net新技术,所以也不打算深究。下面直接讲如何在MVC中取到URL参数值的两种方法吧:1,该方法也是最简单的方法:通过Request.RequestContext.RouteData.Values["参数名"]来获取。本人猜想,该方法是解析出路由中的各参数的值吧,因为我在路由中有配置{controller}/{action}/{id}/{type},所以使用Request.RequestContext.RouteData.Values["type"],就能取到url中type的值了。本人的示例中取id与type参数值的方法如下:private&int&GetUrlID(){int&ID&=&0;if&(Request.RequestContext.RouteData.Values["id"]&!=&null){int.TryParse(Request.RequestContext.RouteData.Values["id"].ToString(),&out&ID);}return&ID;}private&string&GetUrlType(){string&type&=&string.Eif&(Request.RequestContext.RouteData.Values["type"]&!=&null){type&=&Request.RequestContext.RouteData.Values["type"].ToString();}return&}经本人测试,是能正常取到值的。2,在action方法中定义路由中对应的参数,如本例如,可如下定义action方法:[HttpGet]public&ActionResult&SupplierEdit(int&ID,string&Type){ViewData["ID"]&=&ID;ViewData["Type"]&=&Treturn&View();}这样,系统就会自动将ID与Type的值传到action方法中来的了,我们就可以在Views文件夹下的前台文件中使用ViewData["ID"]与ViewData["Type"]来取到url中ID,Type的值了。经测试,这个方法也是行的通的。当然,在前台文件中使用&%:Request.RequestContext.RouteData.Values["type"]%&&同样可以取到值。以上为本人取Request.QueryString值的两个小方法,因为自己对Asp.MVC了解并不太多,所以如果有错误的地方,请大家在评论中指正。
来源:.net学习网
说明:所有来源为 .net学习网 的文章均为原创,如有转载,请在转载处标注本页地址,谢谢!
【编辑:Wyf】
发表评论:
请输入问题&&的结果(结果是:)Request.QueryString的用法(取不到值/中文乱码)解决办法-基础入门-asp.net教程-壹聚教程网Request.QueryString的用法(取不到值/中文乱码)解决办法 取不到值解决办法
天做新的ppc weather服务器的时候竟然碰到QueryString取不到值的问题
查了下网上,应该是编码的问题,tq121用的是utf-8,而我希望用gb2132输入~
因此,改一下~哈哈
打开web.config把
&!-- &globalization
Encoding=&utf-8&
responseEncoding=&utf-8&
改成 &globalization
requestEncoding=&gb2312&
responseEncoding=&gb2312&
&/system.web&
Request.QueryString中文乱码解决办法
下面我们来看两个参数:&test.x?string=%b7%e7%a4%ce%ca%c0%bd%e7&和&test.aspx?string=%e9%a3%8e%e3%81%ae%e4%b8%96%e7%95%8c &。粗略一看,这是给test.aspx页面传递了两个不一样的参数,可是经过正确的URL反编码后,可以发现这两个其实是同一个参数:风世界!为什么同一个参数会得到两个不一样的字符串呢?这是因为第一个参数是用GB2312的URL编码的,而第二个那个则是用UTF-8编码的。如果我们在test.aspx中直接用Request.QueryString[&string&]还取值,会发现第一个参数不能正常取值,而第二个参数则正常。这是因为ASP.NET中在不指定编码的时候,默认是使用UTF-8的编码,自然进行URL反编码的时候用的也是UTF-8编码了。那么,GB2312的URL编码的内容,用UTF-8的URL反编码,那肯定是会不正常的。
  对于这问题,解决方法如下:
  1、提交的参数是经过UTF-8 URL编码的。
  这种情况下,可以不作任何处理即可取到正常的值。例如我提交的是&test.aspx?string=%e9%a3%8e%e3%81%ae%e4%b8%96%e7%95%8c &,那么获取的方法如下:
&& 'Visual Basic.NET
&& Dim stringValue As String
&& stringValue = Request.QueryString(&string&)
&& Response.Write(stringValue)
&& //Visual C#
&& string stringV
&& stringValue = Request.QueryString[&string&];
&& Response.Write(stringValue);
  2、提交的参数是经过GB2312 URL编码的。
  在这种情况下,就不能直接取值了。可以用下面的方法:
'Visual Basic.NET
&& '引用System.Collections.Specialized和System.Text命名空间
&& Dim stringValue As String
&& Dim gb2312Requests As NameValueCollection
&& gb2312Requests = HttpUtility.ParseQueryString(Request.Url.Query, Encoding.GetEncoding(&GB2312&))
&& Response.Write(gb2312Requests(&string&))& '里面的string就是你提交的参数的Key
&& //Visual C#
&& '引用System.Collections.Specialized和System.Text命名空间
&& string stringV
&& NameValueCollection gb2312R
&& gb2312Requests = HttpUtility.ParseQueryString(Request.Url.Query, Encoding.GetEncoding(&GB2312&))
&& Response.Write(gb2312Requests[&string&]);& //'里面的string就是你提交的参数的Key
  有的时候,我们还想提交不同编码的URL编码字符串,可以接着往下看。
  3、提交UTF8 URL编码参数。
  前面已经说过,在不指定编码的时候,系统是自动使用UTF-8编码的,那么我们要提交UTF8 URL编码参数可以直接使用Server.UrlEncode。代码如下:
'Visual Basic.NET
&& Dim strBefore As String = &风世界&
&& Dim strAfter As String = &&
&& strAfter = Server.UrlEncode(strBefore)
&& Response.Write(strAlfter)
&& //Visual C#
&& string strBefore = &风世界&;
&& string strAlfter = &&;
&& strAfter = Server.UrlEncode(strBefore);
&& Response.Write(strAlfter);
4、提交GB2312 URL编码参数。
  因为系统默认使用的是UTF-8编码,所以要用GB2312进行URL编码。得指定一个编码才行。代码如下:
'Visual Basic.NET
&& '引用System.Text命名空间
&& Dim strBefore As String = &风世界&
&& Dim strAfter As String = &&
&& strAfter = HttpUtility.UrlEncode(strBefore, Encoding.GetEncoding(&GB2312&))
&& Response.Write(strAlfter)
&& //Visual C#
&& //引用System.Text命名空间
&& string strBefore = &风世界&;
&& string strAlfter = &&;
&& strAfter = HttpUtility.UrlEncode(strBefore, Encoding.GetEncoding(&GB2312&));
&& Response.Write(strAlfter);
这样,URL编码后得到的就是GB2312的编码字符了。
  另外要注意的地方就是,ASP中Server.UrlEncode是以GB2312编码进行URL编码的。
问题是,如果我们是在JS里面设置QueryString的,那又怎样处理呢?答案是使用encodeURI()函数。
又找到了一篇文章:
中存在几种对URL字符串进行编码的方法:escape(),encodeURI(),以及encodeURIComponent()。这几种编码所起的作用各不相同。
escape() 方法:
采用ISO Latin字符集对指定的字符串进行编码。所有的空格符、标点符号、特殊字符以及其他非ASCII字符都将被转化成%xx格式的字符编码(xx等于该字符在字符集表里面的编码的16进制数字)。比如,空格符对应的编码是%20。
不会被此方法编码的字符: @ * / +
encodeURI() 方法:
把URI字符串采用UTF-8编码格式转化成escape格式的字符串。
不会被此方法编码的字符:! @ # $& * ( ) = : / ; ? + &
encodeURIComponent() 方法:
把URI字符串采用UTF-8编码格式转化成escape格式的字符串。与encodeURI()相比,这个方法将对更多的字符进行编码,比如 / 等字符。所以如果字符串里面包含了URI的几个部分的话,不能用这个方法来进行编码,否则 / 字符被编码之后URL将显示错误。
不会被此方法编码的字符:! * ( ) &
因此,对于中文字符串来说,如果不希望把字符串编码格式转化成UTF-8格式的(比如原页面和目标页面的charset是一致的时候),只需要使用escape。如果你的页面是GB2312或者其他的编码,而接受参数的页面是UTF-8编码的,就要采用encodeURI或者encodeURIComponent。
另外,encodeURI/encodeURIComponent是在javascript1.5之后引进的,escape则在javascript1.0版本就有
好了现在我们来看个实例
File: Default.aspx
&%@ Page Language=&C#& AutoEventWireup=&true& CodeFile=&Default.aspx.cs& Inherits=&QueryStringSender& %&
&!DOCTYPE html PUBLIC &-//W3C//DTD XHTML 1.1//EN& &http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&&
&html xmlns=&http://www.w3.org/1999/xhtml& &
&head runat=&server&&
&&& &title&Untitled Page&/title&
&&& &form id=&form1& runat=&server&&
&&& &asp:Button id=&cmdLarge&
&&&&&&&&&&&&&&& runat=&server&
&&&&&&&&&&&&&&& Text=&Large Text Version&
&&&&&&&&&&&&&&& OnClick=&cmd_Click&&
&&& &/asp:Button&
& &asp:Button id=&cmdNormal& runat=&server& Text=&Normal Version& OnClick=&cmd_Click&&&/asp:Button&
& &asp:Button id=&cmdSmall& runat=&server& Text=&Small Text Version& OnClick=&cmd_Click&&&/asp:Button&
&&& &/div&
&&& &/form&
File: Default.aspx.cs
using System.D
using System.C
using System.C
using System.W
using System.Web.S
using System.Web.UI;
using System.Web.UI.WebC
using System.Web.UI.WebControls.WebP
using System.Web.UI.HtmlC
public partial class QueryStringSender : System.Web.UI.Page
&&& protected void Page_Load(object sender, EventArgs e)
& protected void cmd_Click(object sender, EventArgs e)
&&& Response.Redirect(&NextPage.aspx& + &?Version=& +
&&&&&&& ((Control)sender).ID);
File: NextPage.aspx
&%@ Page Language=&C#&
&&&&&&&& AutoEventWireup=&true&
&&&&&&&& CodeFile=&NextPage.aspx.cs&
&&&&&&&& Inherits=&QueryStringRecipient& %&
&!DOCTYPE html PUBLIC &-//W3C//DTD XHTML 1.1//EN& &http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&&
&html xmlns=&http://www.w3.org/1999/xhtml& &
&head runat=&server&&
&&& &title&Untitled Page&/title&
&&& &form id=&form1& runat=&server&&
&&& &asp:label id=&lblDate&
&&&&&&&&&&&&&& runat=&server&
&&&&&&&&&&&&&& Width=&528px&
&&&&&&&&&&&&&& Height=&112px&
&&&&&&&&&&&&&& Font-Names=&Verdana&
&&&&&&&&&&&&&& Font-Size=&Large&
&&&&&&&&&&&&&& EnableViewState=&False&&
&&& &/asp:label&
&&& &/div&
&&& &/form&
File: NextPage.aspx.cs
using System.D
using System.C
using System.C
using System.W
using System.Web.S
using System.Web.UI;
using System.Web.UI.WebC
using System.Web.UI.WebControls.WebP
using System.Web.UI.HtmlC
public partial class QueryStringRecipient : System.Web.UI.Page
&&& protected void Page_Load(object sender, EventArgs e)
&&& lblDate.Text = &The time is now:&br&& + DateTime.Now.ToString();
&&& switch (Request.QueryString[&Version&])
&&&&& case &cmdLarge&:
&&&&&&& lblDate.Font.Size = FontUnit.XL
&&&&& case &cmdNormal&:
&&&&&&& lblDate.Font.Size = FontUnit.L
&&&&& case &cmdSmall&:
&&&&&&& lblDate.Font.Size = FontUnit.S
上一页: &&&&&下一页:相关内容页面导航:
→ 正文内容 循环取值Request.QueryString的用法
循环取值Request.QueryString的用法
当页面上的FORM以GET方式向页面发送请[/url]求数据(如数据含有不安全字符,则浏览器先将其转换成16进制的字符再传送,如空格被转成%20)时,WEB&&&SERVER&&&将请求数据放入一名为QUERY_STRING的环境变量中,QueryString&&&方法是从这一环境变量中取出相应的值,并将被转成16进制的字符还原(如&&&%20&&&被还原成空格)。&&& &&如表单上有一&&&name为username的文本框及一&&&name为password的文本框&&&,&&&当表单提交时,会产生这样的URL串:/xxxx.asp?username=nnnnn&password=mmmmm&&& &&使用&&&Request.QueryString("username")&&&会得到&&&字符串&&&"nnnnn"&&& &&Request.QueryString("password")&&&得到&&&"mmmmm"&&&!&&& 使用下面方法可以得出所有的请求数据:&&&&&for&&&each&&&xKey&&&in&&&Request.QueryString&&& &&&&&&&&&&response.write("&p&"&&&&&&&xkey&&&&&&&"&&&=&&&"&&&&&&&Request.QueryString(xkey)&&&&&&&"&/p&")&&& &&next&&& &&使用下面方法可以列出所有的环境变量:&&& &&for&&&each&&&xKey&&&in&&&Request.ServerVariables&&& &&&&&&&&&&response.write("&p&"&&&&&&&xkey&&&&&&&"&&&=&&&"&&&&&&&Request.ServerVariables(xkey)&&&&&&&"&/p&")&&& &&nextTop
上一篇:下一篇:
最 近 更 新
热 点 排 行
12345678910

我要回帖

更多关于 querystring 的文章

 

随机推荐