codeigniter中的permitted_uri_chars [英] permitted_uri_chars in codeigniter
问题描述
从Facebook(使用Facebook登录)返回时,我收到您提交的URI不允许字符的错误。
I am getting en error of "The URI you submitted has disallowed characters" when returning from facebook (using facebook login).
我设置permitted_uri_chars如下: $ config ['permitted_uri_chars'] ='az 0-9〜%。:_ \-? =';
i have set permitted_uri_chars as follows: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?=';
,我的网址是: http://www.example/login?state = 460f0c9e013ecc3fcbeeas9592ba2cf2e&代码= AQDWuAZtPI3UK6vZVL8NL5h0LE28z1jdMRtAbFVjB0IUM7P5WsGFijwlgmzGGZWM37TG0tnCeD8YD-bqCKxilATkyJpiE6UdXhdN0s_s_25S93JRcGyF3inDvLXkadlB6gobStlkguwFlCbaMxV3eWRfo32ExGlN4Mb6OyU2PnWAoRYchG9it0q1KQm3D0N1gSY5_g#_ = _
当我改变permitted_uri_chars的配置如下:
when i change permitted_uri_chars in config as below:
$ config ['permitted_uri_chars'] ='';
/ p>
i got below error:
找不到您请求的页面。
The page you requested was not found.
推荐答案
欢迎使用StackOverflow!
Welcome to StackOverflow!
permitted_uri_chars
是CodeIgniter在您的URI中接受。直接从上面的文本块,在 config.php
:
permitted_uri_chars
are the characters that CodeIgniter accepts in your URI. Directly from the block of text above, in config.php
:
您可以使用正则表达式指定哪些字符是
allowed |在您的网址。当有人尝试提交
不允许的网址|
This lets you specify with a regular expression which characters are permitted | within your URLs. When someone tries to submit a URL with disallowed | characters they will get a warning message.
留空以允许所有字符 - 但只有在您疯了时才会显示。
Leave blank to allow all characters -- but only if you are insane.
如果你想允许base64哈希,你需要添加+ =。更改为:
If you want to allow base64 hashes, you'll need to add +=. Change to:
$ config ['permitted_uri_chars'] ='+ = \az 0-9〜%。:_-';
这篇关于codeigniter中的permitted_uri_chars的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!