1. In php.ini, make the following changes:
File_uploads = On
Upload_tmp_dir =/home/upload
Upload_max_filesize = 4000M
Post_max_size = 4000M
Generally, after setting the above four parameters, uploading <=8m files is not a problem, in the network normal situation.
However, if you want to upload a large volume of >8m files, only set the above four items will certainly be able to pass. Unless your network really 100m/s upload high speed, otherwise you have to care about the following parameters:
Max_execution_time = 600
Max_input_time = 600
Memory_limit = 128M
2. Add the following lines to the <form> to confirm the upload:
<input type= "hidden" name= "max_file_size" value= "4000000000" >
3. $_files["UserFile" ["Error"] return value Description:
$_files[' teacher_pic ' [' error '] = 1 file size exceeds file limit in php.ini
$_files[' teacher_pic ' [' error '] = 2 file size exceeds browser limit
$_files[' teacher_pic ' [' ERROR '] = 3 file part is uploaded
$_files[' teacher_pic ' [' error '] = 4 no files found to upload
$_files[' teacher_pic ' [' ERROR '] = 5 Server temp folder is missing
$_files[' teacher_pic ' [' error '] = 6 file Write to Temp folder error
$_files[' teacher_pic ' [' error '] = 1 type of final charge
$_files[' teacher_pic ' [' error '] = 2 file too large, upload file cannot exceed {$this->maxsize} bytes
$_files[' teacher_pic ' [' error '] =-3 upload failed
$_files[' teacher_pic ' [' error '] = 4 failed to set up file directory for upload, please re-specify upload directory
$_files[' teacher_pic ' [' ERROR '] = 5 must specify the path of the uploaded file
Modify PHP upload File size limit