在 PHP 中从查询字符串获取数据
我不知道如何从 PHP 中的 querystring
获取数据。
我想从 access_token
检索数据。
http://www.mygridview.com/sephora/index.php?mod=config#access_token=170791786296375|983b6aefceafdb1cf2d5a122-100001848355029|Hc8qGl6xgpXlmhOWQrLv910on_8&expires_in=0
我该怎么办PHP 中的这个?
I don't know how to get data from the querystring
in PHP.
I'd like to retrieve the data from the access_token
.
http://www.mygridview.com/sephora/index.php?mod=config#access_token=170791786296375|983b6aefceafdb1cf2d5a122-100001848355029|Hc8qGl6xgpXlmhOWQrLv910on_8&expires_in=0
How do I do this in PHP?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
URL 的锚点部分永远不会发送到服务器,因此如果您尝试从当前 URL 加载此信息,该信息将不存在。
就服务器而言,浏览器加载的 URL 是
http://www.mygridview.com/sephora/index.php?mod=config
这是可能的(甚至可能)某些 javascript 使用锚点中的信息来恢复使用 AJAX 更改页面后的状态。在这种情况下,您需要研究 Javascript 才能将锚点信息发送到服务器
The anchor part of a URL never gets sent to the server, so if you are trying to load this information from the current URL it won't be there.
As far as the server is concerned, the URL which is loaded by the browser is
http://www.mygridview.com/sephora/index.php?mod=config
It's possible (maybe even likely) that some javascript is using the information in the anchor to restore the state of the page after it was altered using AJAX. In that case, it's the Javascript you'll need to look into to get that anchor information sent to the server
签出 http://www.routesjs.com,您应该能够获取值并使用 ajax 发送出去。
Checkout http://www.routesjs.com, you should be able to get the values and send it off with ajax.
您获取 url,然后对 url 应用解析函数。
例如::
这个片段是您的要求。如果我是对的,那么尝试一下就成功了。 :)
感谢
您获取当前 URL::
You get url and then apply parse function on url.
eg::
this fragment is your requirement. If i'm right then try this n got success. :)
Thanks
for get current URL::