public function common_substr($str, $start, $length, $encoding){ //截取方法

/*mb_substr( $str, $start, $length, $encoding )

$str,需要截断的字符串

$start,截断开始处,起始处为0

$length,要截取的字数

$encoding,网页编码,如utf-8,GB2312,GBK

*/

return mb_substr( $str, $start, $length, $encoding );

}