啥也不说了,上代码。
function sub_title($t){ $len = 50; $text = $t; return strlen($text)<=$len ? $text : (mb_substr($text,0,$len,'utf-8')."...");}
php字符串截取标题超过