作者 邓超

x

... ... @@ -120,6 +120,11 @@ class UploadFile
// 保存的文件
$this->saveName = '/storage/'.($name ? $name : md5_file($this->tempFile).'.'.$this->ext);
// 验证目录
if(!is_dir(dirname($this->savePath.$this->saveName))){
@mkdir(dirname($this->savePath.$this->saveName),0775,true);
}
if($this->isUpload){
return move_uploaded_file($this->tempFile,$this->savePath.$this->saveName);
}else{
... ...