Use Nginx as the proxy server, the back end is apache2. Set the file to allow uploading up to 100M maximum.
1. Nginx Configuration:
HTTP {
......
Client_max_body_size 100m;
......
}
2. PHP configuration file
......
; Maximum execution time of each script, in seconds
; Http://php.net/max-execution-time
; Note:this directive is hardcoded-0 for the CLI SAPI
Max_execution_time = 0
......
[Data Handling]
; Maximum size of POST data that PHP would accept.
; Http://php.net/post-max-size
Post_max_size = 100M
......
[File uploads]
; Maximum allowed size for uploaded files
Upload_max_filesize = 100M
......
3. $_files[file][' ERROR ' message description
Upload_err_ok
The value is 0, no error occurred and the file upload was successful.
Upload_err_ini_size
The value is 1 and the uploaded file exceeds the upload_max_filesize option limit in php.ini.
Upload_err_form_size
Its value is 2, and the size of the uploaded file exceeds the value specified by the Max_file_size option in the HTML form.
Upload_err_partial
The value is 3, and the file is only partially uploaded.
Upload_err_no_file
Its value is 4 and no files are uploaded.
Upload_err_no_tmp_dir
The value is 6 and the Temp folder cannot be found. PHP 4.3.10 and PHP 5.0.3 introduced.
Upload_err_cant_write
The value is 7, and the file write fails. PHP 5.1.0 introduced.
http://www.bkjia.com/PHPjc/739774.html www.bkjia.com true http://www.bkjia.com/PHPjc/739774.html techarticle using Nginx as the proxy server, the backend is apache2. Set the file that allows uploading to a maximum of 100M. 1. Nginx configuration: http {... client_max_body_size 100m;....} 2. PHP Config file ...