yii framework for php $this->redirect()
function works great, it can redirect to external links, but when I use æ, ø, å
characters in string, they are wrongly shown in the final url after redirect.
$this->redirect ("http://test.com?name=børing");
will redirect me to a page
test.com?name=børing
Help me to fix this issue
尝试这个
$this->redirect("http://test.com?name=" . urlencode("børing"));
So, i combined @zazu suggestion and first answer and this:
urlencode(utf8_decode($url));
Worked for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.