一、截取限制字数:mb_substr()
mb_substr( $str, $start, $length, $encoding ) $str,需要截断的字符串 $start,截断开始处,起始处为0 $length,要截取的字数 $encoding,网页编码,如utf-8,GB2312,GBK
二、获取字符串长度:mb_strlen()
mb_strlen( $str, $encoding ) $str,要计算长度的字符串 $encoding,网页编码,如utf-8,GB2312,GBK标签:mb,encoding,GBK,str,字数,字符串,PHP From: https://www.cnblogs.com/T8888/p/16798186.html