所提交的网址带有不被接受的字符
我有一个代码点火器项目,我想尝试使用 Zend Studio 调试它。 当我开始调试时,我立即运行 ino
“您提交的 URI 包含不允许的字符”。
有人有什么主意吗?
I have a code igniter project, and I wanted to try debugging it using Zend Studio. WHen I start debugging, I immediately run ino
"The URI you submitted has disallowed characters."
Does anyone have any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
(假设您使用的是最新版本的 CodeIgniter (CI),即 1.7.0)
CI 对于 URL 中允许使用的字符非常严格。 您可以修改用于过滤 URL 的正则表达式。
在 system/config/config.php 的第 126 行中,
这一行上面的注释几乎解释了这一切,以及使用什么哨兵值来覆盖此过滤器并允许所有字符(即完全关闭过滤)。
顺便说一句,我发现 CI 的限制性太大(它不允许 GET 请求,并希望所有交互都通过 POST 进行。我觉得这绝对疯狂,就像倒洗澡水时把婴儿一起倒掉一样。显然,我不是唯一一个认为 CI 限制过多的人,Kohana Project 是 CI + 优化的一个分支,即纯 php5 支持(全部 OO),(CI 仍然兼容 PHP4,代价是无法采取PHP5 OO 功能的优势)
相比 CI,我更喜欢 Kohana,YMMV
http://kohanaphp.com/home
(Assuming you are using the latest version of CodeIgniter (CI) which is 1.7.0)
CI is pretty strict about what characters it allows in URLs. You can modify the regex that is used to filter URLs.
In system/config/config.php on line 126 is
The comment above this line pretty much explains it all, and what sentinel value to use to over-ride this filter and permit all characters (i.e. turn off filtering completely).
On a side note, I found CI to be way too restrictive (for one it doesnt allow for GET requests and wants all interactions to happen via POST. I find this absolutely crazy and is akin to throwing the baby out with the bath water. Apparently, I am not the only one who thinks that CI is overly restrictive, the Kohana Project is a fork of CI + optimizations, namely pure php5 support (all OO), (CI is still PHP4 compatible at the expense of not being able to take advantage of PHP5 OO capabilities).
I prefer Kohana over CI, YMMV
http://kohanaphp.com/home
如果使用旧版本的 CodeIgniter 和 PHP 5.4,您必须修改
到
/system/libraries/URI.php
If using an old version of CodeIgniter and PHP 5.4 you have to modify
into
in
/system/libraries/URI.php
在表达式引擎中,您会在 /admin/expressionengine/config/config.php 中找到此
更改,
但在执行此操作之前请阅读行注释。
或者不要使用任何基于 CI 的东西。
in Expression engine you'll find this in /admin/expressionengine/config/config.php
change to
but read the line comment before you do this.
Or don't use anything CI based.