I have URL like this http://domain/home/activate/MzU= .the parameter
"MzU=" = base64encode($data)
I cant open this URL with this parameter.
Error like this!"The URI you submitted has disallowed characters."
How can i pass base64encode characters in codeigniter url?
You can create a helper with the following functions:
function url_query_encode($array = array())
{
return str_replace('/', '_', rtrim(base64_encode(gzcompress(serialize($array))), '='));
}
function url_query_decode($str = '')
{
return (is_string($str) && strlen($str)) ? @unserialize(gzuncompress(base64_decode(str_replace('_', '/', $str)))) : FALSE;
}
Please add the character "=" to $config['permitted_uri_chars'] in your config.php file which is available in your application/config directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With