CodeIgniter - 不允许的关键字符 [英] CodeIgniter - disallowed key characters

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

问题描述

可能的重复:
CodeIgniter 禁止的关键字符

我尝试提交的表单有点问题,它的动态值和复选框值来自数据库,唯一的问题是其中一个字段有 # 和当我尝试提交表单时,它返回 'disallowed key characters'.

I have a bit of an issue with a form I'm trying to submit, its dynamic and the checkbox values come from the database, only problem is that one of the fields has a # and when I try to submit the form, it returns 'disallowed key characters'.

我如何才能提交 # ?

推荐答案

根据您的问题,您似乎在表单中使用 get 作为方法,因此它给出了不允许的关键字符 错误.

As per your question it seems that you are using get as a method in the form and because of that it is giving disallowed key characters error.

要允许字符 # 只需在 CONFIG 文件中的以下内容中添加它 -

To allow the character # just add it in the following in your CONFIG file -

$config['permitted_uri_chars'] = '#';

现在 url 中将允许使用字符 #.

And now the character # will be allowed in the url.

这篇关于CodeIgniter - 不允许的关键字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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