CodeIgniter启用查询字符串 [英] CodeIgniter Enabling Query Strings

查看:123
本文介绍了CodeIgniter启用查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个网址:

http://twitternieuws.com/class/function/ID?oauth_token=xxxxx&oauth_verifier=xxxxx

我不断收到错误,例如找不到您要求的网页或您提交的URI不允许使用字符。我尝试用不同的设置更改以下选项:

And I keep getting errors like "The page you requested was not found" or "The URI you submitted has disallowed characters". I tried changing the following options with different settings:

$config['permitted_uri_chars'];
$config['enable_query_strings'];
$config['uri_protocol'];

我能做些什么来使它工作吗?我在1.7中使用codeigniter 1.7.2

Is there anything I can do to make it work? I am using codeigniter 1.7.2

推荐答案

2是一个笑话,它使用?c = controller& m = method 基本上改变你漂亮的urls到psuedo $ _GET params。我真的看不出为什么任何人会按照它的目的使用它,这是非常误导,并且与正常的查询字符串相同。

Query strings in 1.7.2 are a joke, it uses ?c=controller&m=method to basically change your pretty urls to psuedo $_GET params. I really can't see why anyone would use it the way it's intended, it's very misleading and is not the same as normal query strings.

高度建议您查看最新版本的Codeigniter,他们不会取消设置$ _GET数组(正常的查询字符串现在可用)。在旧版本的一个核心文件中,它表示 CI不使用$ _GET,因此我们将unset()全局$ _GET数组。那么,如果需要使用$ GET?我总是认为这是疯了,人们一直在尖叫为真正的$ _GET支持永远。

I highly suggest you check out the latest version of Codeigniter, where they do not unset the $_GET array (normal query strings are now usable). In one of the core files in the older versions it says CI does not use $_GET so we are going to unset() the global $_GET array. Well, what if I need to use $GET? I always thought it was crazy, and people have been screaming for true $_GET support for forever.

很高兴,是时候升级:

最新信息: https://bitbucket.org/ellislab/codeigniter-reactor/

稳定: http://codeigniter.com/

这篇关于CodeIgniter启用查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆