/** * 未知类型单页显示 支持年月日限定 * @param $method 魔术方法名称 即文章类型 * @param $args */ public function _empty($method, $args) { //TODO 通用模板机制 $Posts = new PostsLogic(); $info = I('get.info'); $post_detail = $Posts->detail($info, true); $Posts->viewInc($post_detail['post_id']); $this->assign('post', $post_detail); // 赋值数据集 if (File::file_exists(T('Home@Post/' . $post_detail['post_template']))) { $this->display($post_detail['post_template']); } else { //TODO 这里怎么处理却决于你自己了。 $this->error404('缺少对应的模版而不能显示'); // $this->display('single'); } // $this->display($post_res['post_type']); }