CodeIgniter - URI Disallowed Characters

2019-06-05 11:02发布

I had issue of @ which I added in $config['permitted_uri_chars'] as you can see below:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_@\-';

BUt here is my URL

http://mydomain.com/awarenessroom/facebook_image_share/aHR0cDovL2Rldi5lanVpY3lzb2x1dGlvbnMuY29tL3Jla2xhaW1wYWtpc3Rhbi5jb20vdXBsb2Fkcy9hd2FyZW5lc3Nfcm9vbS9pbWFnZXMvOTEwNzA4ODI3VG9yIERheSBaYW5qZWVyLmpwZw==

and it says "The URI you submitted has disallowed characters.", even if I add = in config, still not working. Can anybody let me know what is required exactly by CI in config to get resolved for URI to be working?

3条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-06-05 11:06

Please use url_encode(base64_encode(string)) and then decode it. It will help you for sure.

查看更多
对你真心纯属浪费
3楼-- · 2019-06-05 11:21

As per your info you are using base64_encode so this i will suggest to you because i am following the same in my web application

$encode_string = "google.com";

$result = rtrim(base64_encode($encode_string ),'=');

$decoded_string = base64_decode($result);
查看更多
▲ chillily
4楼-- · 2019-06-05 11:28
登录 后发表回答