函数 mb_strlen( $str, $encoding ) 参数 $str,要计算长度的字符串 $encoding,网页编码,如utf-8、GB2312、GBK 实例 $str='wordpress_WPMI笔记'; echo mb_strlen($str,'utf-8'); // 结果:15