request->param('id',0,'intval'); $news=Db::name("posts") ->field("post_title,post_content") ->where("id='{$id}'")->find(); $this->assign("news",$news); return $this->fetch(); } //读取常见问题下的文章列表 public function questions(){ $questionList=Db::name("posts") ->field("id,post_title") ->where("termid=13") ->select(); $questionList->all(); $time=time(); $this->assign("questionList",$questionList); $this->assign("time",$time); return $this->fetch(); } }