Home >Backend Development >PHP Tutorial >Solution to Chinese garbled POST in IE browser - PHP implementation
Under the IE browser, the POST data contains Chinese characters, which will become garbled after being obtained in the background. The solution is as follows:
$keys = $_REQUEST['keys']; if ($keys != '') { $encode = mb_detect_encoding ($keys, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5")); if ($encode != "UTF-8") { $keys = iconv ("gb2312", "UTF-8", $keys); } }
Reference: http://blog.sina.com.cn/s/blog_703bcf7c0100s6vb. html
The above introduces the solution to the Chinese garbled POST under IE browser - PHP implementation, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.