thinkphp文章管理代
自己封入の方法:
function wenzhang1($chart=''){
$user=D($chart);
$list=$user->where("products_category=1")->select();
//thumbRemoveOrigin
$this->assign("wenzhang1",$list);
}
関数 wenzhang2($chart=''){
$user=D($chart);
$list=$user->where("products_category=2")->select();
//thumbRemoveOrigin
$this->assign("wenzhang2",$list);
}
関数 wenzhang3($chart=''){
$user=D($chart);
$list=$user->where("products_category=3")->select();
//thumbRemoveOrigin
$this->assign("wenzhang3",$list);
}
関数 wenzhang4($chart=''){
$user=D($chart);
$list=$user->where("products_category=4")->select();
//thumbRemoveOrigin
$this->assign("wenzhang4",$list);
}
関数 wenzhang5($chart=''){
$user=D($chart);
$list=$user->where("products_category=5")->select();
//thumbRemoveOrigin
$this->assign("wenzhang5",$list);
}
関数 wenzhangxi($chart='',$pid=''){
$user=D($chart);
$list=$user->where("products_id=".$pid."")->select();
//thumbRemoveOrigin
$this->assign("文章渓",$list);
}
関数 wenzhangx(){
$this->wenzhang1('wenzhang');
$this->wenzhang2('wenzhang');
$this->wenzhang3('wenzhang');
$this->wenzhang4('wenzhang');
$this->wenzhang5('wenzhang');
}
后台代:
後台代码にこの句话(调用封装好的方法、上面有)
$this->wenzhangx();
前台显表示代: