php url地址栏传中文值乱码问题与解决方法
$url = 'aaa.php?region='.urldecode("四川省");
?>
<a href="<?php echo $url;?>">aaa </a>
//方法二base64_encode
<?
$test="四川省";
$test1=base64_encode($test);
echo '<a href="www.jiaochengji.com?region=$test1">aaa </a>';
?>
另一页面使用base64_decode解开
base64_decode($region);
//方法三让服务器支持中文
[root@dhcp ~]# locale
lang=zh_cn.utf-8
lc_ctype="zh_cn.utf-8"
lc_numeric="zh_cn.utf-8"
lc_time=c
lc_collate=c
lc_monetary="zh_cn.utf-8"
lc_messages="zh_cn.utf-8"
lc_paper="zh_cn.utf-8"
lc_name="zh_cn.utf-8"
lc_address="zh_cn.utf-8"
lc_telephone="zh_cn.utf-8"
lc_measurement="zh_cn.utf-8"
lc_identification="zh_cn.utf-8"
lc_all=
[root@dhcp ~]#
您可能感兴趣的文章:
asp.net url 地址栏乱码,中文超过两个汉字就乱码
php url地址栏传中文值乱码问题与解决方法
PHP URL传递中文乱码问题解决办法
php中文乱码问题解决方法
php网页标题中文乱码如何解决
asp读sql数据时出现乱码问题的解决方法
php伪静态如何获取地址栏url
php分割GBK中文乱码的解决方法
js url传值中文乱码的简单解决办法
php解析JSON中文乱码问题的解决方法