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 中使用 React Router? 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
