当我们的网页的编码是utf-8时,我们可以这样用: iconv_strlen($str,"utf-8") 来获得$str的字数 例如:iconv_strlen("你好hehe","utf-8") //6