摘要: 表model类中 //Getter方法 处理content字段 public function getContentText(){ $tmp = strip_tags($this->content); $temLen = mb_strlen($tmp); return mb_substr($tmp, 阅读全文
posted @ 2020-04-21 16:06 没事就更 阅读(241) 评论(0) 推荐(0) 编辑
摘要: $tmp = strip_tags($model->content);$temLen = mb_strlen($tmp);return mb_substr($tmp,0,20,'utf-8').(($temLen>20)?'...':""); 阅读全文
posted @ 2020-04-21 11:46 没事就更 阅读(1340) 评论(0) 推荐(0) 编辑