gpt4 book ai didi

asp-classic - 请求与 Request.QueryString

转载 作者:行者123 更新时间:2023-12-04 00:39:49 25 4
gpt4 key购买 nike

这两者在VBScript中有什么区别:

Request("startDate")

Request.QueryString["startDate"]

在哪里 Request("startDate")记录在案?我在这里没有看到这种用法:

http://www.w3schools.com/asp/asp_ref_request.asp

最佳答案

Request 的官方文档ASP 经典中的对象在这里:http://msdn.microsoft.com/en-us/library/ms524948%28VS.90%29.aspx

引用这个问题的相关部分:

All variables can be accessed directly by calling Request(variable) without the collection name. In this case, the Web server searches the collections in the following order:

  • QueryString
  • Form
  • Cookies
  • ClientCertificate
  • ServerVariables

If a variable with the same name exists in more than one collection, the Request object returns the first instance that the object encounters.



编辑:AnthonyWJones 对这个问题发表了很好的评论:避免使用 Request("name")语法。实际上,上面的文档链接中提到了这一点:

It is strongly recommended that when referring to members of a collection the full name be used. For example, rather than Request.("AUTH_USER") use Request.ServerVariables("AUTH_USER"). This allows the server to locate the item more quickly.

关于asp-classic - 请求与 Request.QueryString,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9196476/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com