开发者

What does the symbol ? mean in a URL?

What does the symbol ? mean 开发者_如何学Pythonin a URL?


That portion of the URL (ie. after the ?) is known as the query string.
http://en.wikipedia.org/wiki/Query_string

It is used to pass parameters into web applications.

For example, in ASP.NET I might have an .aspx page like so:
http://example.com/myapp/default.aspx

Inside my codebehind for that page I can look for the presence of any query string parameters:

string paramValue = Request.QueryString["param"];

So if someone visits my page with the URL of http://example.com/myapp/default.aspx?param=abcd
Then the value of paramValue will be "abcd".


RFC for http protocol, section 3.2.2 http URL

"?" - is delimiter between "absolute path" and "query"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜