/** * 上传 */ public function addAction() { if ($this->_request->isPost()) { $post = $this->_request->getPost(); $post['uid'] = $this->auths->uid; $fileData = $_FILES['file']; $data = $this->file->add($post, $fileData, false); $this->_redirect($this->view->url(array('action' => 'list'))); } $this->view->cateId = $this->_getParam('id'); $select = $this->file->cateListSql()->where('cate.allow_upload=1'); $this->view->categories = $this->db->fetchAll($select); }