utf8 gbk 互转

public static function utf8_to_gbk($utfstr) {
        return iconv("utf-8", "gbk//IGNORE", $utfstr);
}
static function gbk_to_utf8($gbstr) {
        return mb_convert_encoding($gbstr, "utf-8", "gbk");
}

 

posted @ 2017-08-27 11:29  王先生架构  阅读(344)  评论(0编辑  收藏  举报
失独者之家