您好,欢迎访问一九零五行业门户网

TP里面的Upload类的疑点

tp里面的upload类的疑问
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();
}
}
这是我写在我的模型里面的添加文章的方法,调用tp的上传类 能检测到$_files数据 可是返回的$info什么都没有 
去看了upload类 里面return empty($info) ? false : $info; 按说就算错误也应该返回false可是什么都没有返回
请问是我使用的不对吗  是最新的3.2的tp框架....先谢过
------解决方案--------------------
print_r($upload); 能看到什么?
其它类似信息

推荐信息