phpmb_convert_encoding文字编码转换函数
时间:2021-07-01 10:21:17
帮助过:25人阅读
$str='脚本学堂:http://bbs.it-home.org'; - echo mb_convert_encoding($str, "utf-8"); //编码转换为utf-8
$str='程序员之家:http://bbs.it-home.org'; - echo mb_convert_encoding($str, "utf-8", "gbk"); //已知原编码为gbk,转换为utf-8
$str='程序员之家:http://bbs.it-home.org'; - echo mb_convert_encoding($str, "utf-8", "auto"); //未知原编码,通过auto自动检测后,转换编码为utf-8
- ?>
|