我的上传是工作文件,直到我昨晚完成工作,但是今天当我尝试上传大于 2MB 的文件时,我遇到了异常"The file is too large (Server Exception)."
,谁能告诉我为什么会出现这个问题,因为 2MB 不是很大那个php不能处理。我的上传脚本是:
function uploadFile(){
if ( $this->error == 0 ){
if ( $this->destination == null ){
if ( $this->ext !== null || $this->ext !== '' ){
if ( in_array( $this->ext , $this->allowedExtensions ) ){
$tmp_file = $this->tmp_name;
if ( file_exists( $tmp_file ) ) {
$this->fileUid = md5(time());
move_uploaded_file($this->tmp_name, "/home/totalrec/upload/" . $this->fileUid.'.'.$this->ext);
return true;
} else {
$this->error = $tmp_file;
}
} else {
$this->error = 10;
}
} else {
$this->error = 9;
}
} else {
}
} else {
return false;
}
}