关于把$_FILES临时文件中的文件name放到$fileInfo中的问题
public function _construct($fileName='myFile',$maxSize=524880,$allowExt=array('jpeg','jpg','png','gif'),$allowMime=array('image/jpeg','image/png','image/gif'),$imgFlag=true,$uploadPath='./uploads'){
$this->fileName=$fileName;
$this->maxSize=$fileSize;
$this->allowExt=$allowExt;
$this->allowMime=$allowMime;
$this->imgFlag=$imgFlag;
$this->uploadPath=$uploadPath;
$this->fileInfo=$_FILES[$this->fileName];
}
上边是部分代码,都是按照老师教的写的,用$this->fileInfo=$_FILES[$this->fileName];把上传文件的名字“myFile”放到$this->fileInfo里,但实际我用var_dump($this->fileInfo)查看的时候却显示为NULL,同学们,能帮我解决下么? 十分感谢!!