永发信息网

那位高手帮下忙下段代码是PHP调用文章的,我只想让指定的ID内容出来怎么改

答案:2  悬赏:10  手机版
解决时间 2021-01-25 10:32
  • 提问者网友:饥饿走向夜
  • 2021-01-25 03:41
$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');
}
最佳答案
  • 五星知识达人网友:旧脸谱
  • 2021-01-25 04:02
你上面应该是查询的指定分类里面的文章列表,文章列表中应该含有文章id的吧 根据id再来调用
全部回答
  • 1楼网友:街头电车
  • 2021-01-25 04:57
没看懂什么意思?
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯