CodeIgniter PHP Framework - 需要获取查询字符串

CodeIgniter PHP Framework - Need to get query string(CodeIgniter PHP Framework - 需要获取查询字符串)
本文介绍了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 - 需要获取查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)