Home > Article > Backend Development > Solve the problem of garbled URL parameters in PHP
How to solve the problem of garbled URL parameters in PHP:
When using PHP language to do server-side redirection, the Chinese garbled problem may occur?
The solution is also very simple:
$contents= file_get_contents('http://www.yitire.com/'); // 获取 页面内容 $en_contents=mb_convert_encoding($contents, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5'); // 对页面内容进行编码
The disadvantage of this kind of server-side jump is that it cannot pass session and cookie, but there are also corresponding methods to solve it.
Recommended tutorial: "php tutorial"
The above is the detailed content of Solve the problem of garbled URL parameters in PHP. For more information, please follow other related articles on the PHP Chinese website!