/** * 添加文章的操作 */ public function add() { $PostsEvent = new PostsEvent(); $post_id = $PostsEvent->insertEmpty(); // $this->redirect(U("Admin/Posts/posts",array("id"=>$post_id))); // $post_restored = $PostEvent->restoreFromCookie(); $this->posts($post_id, true); die; }