那位高手帮下忙下段代码是PHP调用文章的,我只想让指定的ID内容出来怎么改 10
$cid=I('id','','trim');$title='文章阅读';$p=I('p',1,'intval');$map['status']="1";if($cid)...
$cid = I('id','', 'trim');
$title = '文章阅读';
$p = I('p',1, 'intval');
$map['status']="1";
if($cid){
$map['cate_id'] = $cid;
$title = $this->cats_list[$cid]['name'];
}
$page_size = 20;
$start = $page_size * ($p - 1) ;
$order = 'ordid asc ';
$order.= ', id DESC';
$cat = $this->cats_mod->find($cid);
$article_list = $this->article_mod->where($map)->order($order)->limit($start . ',' . $page_size)->select();
$this->assign('cid',$cid);
$this->assign('article_list',$article_list);
$count = $this->article_mod->where($map)->count();
$pager = $this->_pager($count, $page_size);
$this->assign('page', $pager->fshow());
$this->_config_seo(C('ftx_seo_config.article_cate'), array(
'title' => $cat['name'],
'cate_name' => $cat['name'],
'seo_title' => $cat['seo_title'],
'seo_keywords' => $cat['seo_keys'],
'seo_description' => $cat['seo_desc'],
));
$this->display('index');
} 展开
$title = '文章阅读';
$p = I('p',1, 'intval');
$map['status']="1";
if($cid){
$map['cate_id'] = $cid;
$title = $this->cats_list[$cid]['name'];
}
$page_size = 20;
$start = $page_size * ($p - 1) ;
$order = 'ordid asc ';
$order.= ', id DESC';
$cat = $this->cats_mod->find($cid);
$article_list = $this->article_mod->where($map)->order($order)->limit($start . ',' . $page_size)->select();
$this->assign('cid',$cid);
$this->assign('article_list',$article_list);
$count = $this->article_mod->where($map)->count();
$pager = $this->_pager($count, $page_size);
$this->assign('page', $pager->fshow());
$this->_config_seo(C('ftx_seo_config.article_cate'), array(
'title' => $cat['name'],
'cate_name' => $cat['name'],
'seo_title' => $cat['seo_title'],
'seo_keywords' => $cat['seo_keys'],
'seo_description' => $cat['seo_desc'],
));
$this->display('index');
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询