
文字编码的转换mb_convert_encoding()
mb_convert_encoding( $str, $encoding1,$encoding2 )
$str,要转换编码的字符串
$encoding1,目标编码,如utf-8,gbk,大小写均可
$encoding2,原编码,如utf-8,gbk,大小写均可
实例1
$str=绿夏网:http://www.gimoo.net;
echo mb_convert_encoding($str, “UTF-8”); //编码转换为utf-8
?
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...