/** * * 添加分类 */ public function addCate() { if (!empty(I('post.cname'))) { $PS = new PaperService(); if ($PS->doAddCate(I('post.cname'))) { redirect(U('Cates/index')); exit; } else { $this->error('添加分类失败', U('Cates/addCate'), 2); exit; } } $this->assign('mark', '添加分类'); $this->display('addCate'); }