日期:2014-05-16 浏览次数:20535 次
public function add_article(){
if($this->create()){
p($_POST);
p($_FILES);
if(!empty($_FILES['thumb']['name'])){
$upload = new \Think\Upload();
$upload->savePath = './upload/article/';
$upload->exts = array('jpg', 'gif', 'png', 'jpeg');
$upload->maxSize = 3145728;
$info = $upload->upload();
print_r($info);die;
$this->data['thumb']=$file[0]['path'];
}
return $this->add();
}
}