form action =“?login” :问号是什么意思? [英] form action="?login" : What does the question mark mean?
问题描述
< form action =?loginmethod =post> <按钮>使用Google登录< / button> < /形式>
我通常会看到这个动作引用了一个php或html文件,但?login让我感到困惑。
背景信息:
这是埋在lightopenid框架的example-google.php文件中。我一直盯着openid代码使用谷歌作为第三方openid提供者在我的网站上的用户登录和示例代码的所有作品。试图更清楚地了解当用户按下登录按钮时框架正在做什么。我知道我们必须向这个按钮动作发送一堆参数给谷歌,但登录似乎并没有指向任何地方。
http://gitorious.org/lightopenid
问号表示查询字符串。它将使用查询字符串参数 login
发布到当前url。我不确定在你点击提交(发布表单)后你是如何处理请求的,但通常它会为它赋值,如 login = value
<form action="?login" method="post"> <button>Login with Google</button> </form>
I usually see the action refer to a php or html file but the "?login" stumps me.
Background info: This is buried within the example-google.php file from lightopenid framework. I've been staring at the openid code to use google as a third party openid provider for user login on my web site and the sample code all works. Trying to get a clearer picture of what the framework is doing when the user presses the login button. I know that we must be sending a bunch of arguments to google on this button action but the ?login doesnt seem to point anywhere.
http://gitorious.org/lightopenid
a question mark denotes the query string. It will post to the current url with a query string parameter of login
. I am not sure how you are processing the request after you click submit(post the form) but usually it would have a value assigned to it as in login=value
这篇关于form action =“?login” :问号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!