CodeIgniter PHP Framework - Need to get query string(CodeIgniter PHP Framework - 需要获取查询字符串)
问题描述
我正在使用 CodeIgniter 创建一个电子商务网站.
I'm creating an e-commerce site using CodeIgniter.
我应该如何获取查询字符串?
How should I get the query string?
我正在使用 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.
我尝试在 config.php
中使用 uri_protocol = 'PATH_INFO'
和 enable_query_strings = 'TRUE'
启用.在谷歌搜索时,我发现如果我使用 htaccess rewrite 这将不起作用.
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 Framework - 需要获取查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:CodeIgniter PHP Framework - 需要获取查询字符串


- Laravel 仓库 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01