function intercept($str,$length = 10){ if (strlen($str)>$length) $str=substr($str,0,$length) . ‘...‘; return $str; }
字符串超过特定长度使用...代替
原文:https://www.cnblogs.com/pcx105/p/9316046.html