摘要:
model层 public function selectone($ag_id=''){ return $this->findBySql("SELECT * FROM agency where ag_id=$ag_id")->asArray()->one(); } controller层 $ag_i 阅读全文
摘要:
<?php if(($key+1)%4==0):?> <tr></tr> <?php endif;?> if标签可以轻松显示 阅读全文
摘要:
public function selectall(){ return $this->findBySql("SELECT * FROM article order by art_time desc limit 5")->asArray()->all(); } 阅读全文
摘要:
<?php echo mb_strlen($value['art_time'], 'utf-8') > 10 ? mb_substr($value['art_time'], 0, 10, 'utf-8').'...' :$value['art_time'] ; ?> 将需要截取的字段替换,替换限制长 阅读全文