admin管理员组文章数量:1417106
I'm using joomla and acesef as a plugin and I need to get the full querystring as is. The problem is when I use $_SERVER['QUERY_STRING']
it contains the joomla QS isntead of my custom parameters.
A javascript or PHP solution would do. thanks
Edit: Sample URL www.test/sc/my-account.html?action=payment-method I want to get
action=payment-method
Instead I get
option=_content&Itemid=4&id=16&lang=sc&view=article
I'm using joomla and acesef as a plugin and I need to get the full querystring as is. The problem is when I use $_SERVER['QUERY_STRING']
it contains the joomla QS isntead of my custom parameters.
A javascript or PHP solution would do. thanks
Edit: Sample URL www.test./sc/my-account.html?action=payment-method I want to get
action=payment-method
Instead I get
option=_content&Itemid=4&id=16&lang=sc&view=article
Share
Improve this question
edited Jun 30, 2012 at 16:15
Anirudh Ramanathan
46.8k23 gold badges135 silver badges194 bronze badges
asked May 20, 2010 at 8:47
wnovenownoveno
5463 gold badges10 silver badges25 bronze badges
4
- could you give an example of the url? – Sarfraz Commented May 20, 2010 at 8:49
-
3
$_SERVER["QUERY_STRING"]
is the best you're going to get. What kind of custom parameters are you talking about? Can you show an example? – Pekka Commented May 20, 2010 at 8:49 - www.test./sc/my-account.html?action=payment-method but the server variable contains the joomla query string (_content...) – wnoveno Commented May 20, 2010 at 8:54
- www.test./sc/my-account.html - yes – wnoveno Commented May 20, 2010 at 9:02
3 Answers
Reset to default 1Your Joomla setup probably has a mod_rewrite rule in .htaccess that is ignoring the original GET parameters and rewriting the whole GET query string, you'll have to hack your way into the .htaccess file.
Or stop using Joomla.
Found the one that solves my problem var qs = window.location.search.substring(1);
Thanks everyone SO rocks :)
You don't get what's in the URL, you get what the server hands you. That includes parameters added by things such as mod_rewrite
. If you need specific parameters then index $_GET[]
appropriately, otherwise live with it.
本文标签: phpHow can I get the full query string of a pageStack Overflow
版权声明:本文标题:php - How can I get the full query string of a page - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745244905a2649510.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论