CodeIgniter PHP框架 - 需要获取查询字符串 [英] CodeIgniter PHP Framework - Need to get query string
问题描述
我使用 CodeIgniter 创建了一个电子商务网站。
I'm creating an e-commerce site using CodeIgniter.
如何获取查询字符串?
我使用的是 Saferpay 支付网关。网关响应将如下所示:
I am using a Saferpay payment gateway. The gateway response will be like this:
http://www.test.com/registration/success/?DATA=<IDP+MSGTYPE%3D"PayConfirm"+KEYID%3D"1-0"+ID%3D"KI2WSWAn5UG3vAQv80AdAbpplvnb"+TOKEN%3D"(unused)"+VTVERIFY%3D"(obsolete)"+IP%3D" 123.25.37.43"+IPCOUNTRY%3D"IN"+AMOUNT%3D"832200"+CURRENCY%3D"CHF"+PROVIDERID%3D"90"+PROVIDERNAME%3D"Saferpay+Test+Card"+ACCOUNTID%3D"99867-94913159"+ECI%3D"2"+CCCOUNTRY%3D"XX"%2F>&SIGNATURE=bc8e253e2a8c9ee0271fc45daca05eecc43139be6e7d486f0d6f68a356865457a3afad86102a4d49cf2f6a33a8fc6513812e9bff23371432feace0580f55046c
处理响应我需要获取查询字符串数据。
To handle the response I need to get the query string data.
对不起,我没有解释清楚问题。
Sorry, I haven't explained the problem clearly. I am getting a 'Page not found' error while getting the response from the payment site after payment.
我已经尝试启用 uri_protocol =',我在收到付款网站的回应后发生「找不到网页」错误。在
和 config.php
中的PATH_INFO enable_query_strings ='TRUE'
。虽然googling我发现如果我使用htaccess重写,这将不工作。
I have tried enabling with uri_protocol = 'PATH_INFO'
and enable_query_strings = 'TRUE'
in config.php
. While googling I found this won't work if I use htaccess rewrite.
我已经尝试更改配置项,但它不工作。
I have already tried changing the config entries, but it doesn't work.
推荐答案
您可以这样得到:
$this->input->get('some_variable', TRUE);
查看详情。
这篇关于CodeIgniter PHP框架 - 需要获取查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!