{"id":207,"title":"thinkphp\u7f51\u9875\u9759\u6001\u5316","good":0,"bad":0,"hit":2121,"created_at":"2016-03-11 22:58:14","content":"\u5173\u4e8e\u5728thinkphp\u4e2d\u600e\u4e48\u5728\u540e\u53f0\u751f\u6210\u524d\u53f0\u9759\u6001\u9875\u9762\u7684\u65b9\u6cd5\uff1a<\/strong>

\u5728thinkphp3.1.3\u4e2d\u6709\u4e2a\u5b98\u65b9\u63d0\u4f9b\u7684\u7684buildhtml()\u65b9\u6cd5\u6765\u751f\u6210<\/p>

 <\/p>

\u4f8b\u5b50\uff1a<\/p>

 <\/p>

 public function index(){  \/\/\u6700\u65b0\u6587\u7ae0  $this->newArticle=M('article')->where("`classid`!='$this->classid1'")->order("`id` desc")->limit(10)->select();  \/\/\u4f5c\u54c1  $this->works=M('article')->where("`classid`='$this->classid2'")->order("`id` desc")->limit(6)->select();  \/\/\u76f8\u518c  $this->photo=M('photo_cover')->order("`id` desc")->limit(10)->select();  \/\/\u5b66\u4e60  $ids=get_ids('class', '0-2-');  $study=M('article')->where("classid in($ids) and pic<>'' and `isdel`='0'")->order("`id` desc")->limit(15)->select();  $this->study=$study;  self::common();\/\/\u9875\u9762\u7684\u516c\u5171\u90e8\u5206\u6a21\u677f\u5185\u5bb9\u66ff\u6362  if($this->buildHtml('index','.\/','home@Index\/index')){   $this->success('\u751f\u6210\u9996\u9875\u6210\u529f',U('Index\/index'));  } }<\/p>"}