私はこのようなURLを持っていますhttp://domain/home/activate/MzU=
.theパラメータ
"MzU=" = base64encode($data)
このパラメーターでこの URL を開くことができません。こんなエラー!"The URI you submitted has disallowed characters."
codeigniter URLでbase64encode文字を渡すにはどうすればよいですか?
私はこのようなURLを持っていますhttp://domain/home/activate/MzU=
.theパラメータ
"MzU=" = base64encode($data)
このパラメーターでこの URL を開くことができません。こんなエラー!"The URI you submitted has disallowed characters."
codeigniter URLでbase64encode文字を渡すにはどうすればよいですか?
次の関数を使用してヘルパーを作成できます。
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;
}
application/config ディレクトリにある config.php ファイルの $config['permitted_uri_chars'] に文字 "=" を追加してください