The Public Environment Front Section
<form enctype= "Multipart/form-data" action= "upload.php" method= "POST" >
<!--max_file_size must precede the FILE input field-->
<input type= "hidden" name= "max_file_size" value= "100000000"/>
<!--name of INPUT element determines Name in $_files array-->
Send This file: <input name= "UserFile" type= "file"/>
<input type= "Submit" value= "Send File"/>
</form>
Nginx+linux Environmental considerations
PHP environment upload large files need to pay attention to matters:
/usr/local/php/etc/php-fpm.conf.default
Request_terminate_timeout = 0//This is the fastcgi execution time, which is not restricted by default
Client_max_body_size 256m;
Fastcgi_buffer_size 256k;
Fastcgi_buffers 256k;
Fastcgi_busy_buffers_size 256k;
Fastcgi_temp_file_write_size 256k;
Fastcgi_connect_timeout 3000;
Fastcgi_send_timeout 3000;
Fastcgi_read_timeout 3000;
In addition, PHP also needs to configure:
Memory_limit 512M
Max_execution_time 0
Post_max_size 256M
Upload_max_filesize 256M
Precautions under Apache+windows Environment
Configure PHP.ini files (for example, files of the size of 500M below)
Look for the following options and modify the->
File_uploads = on; open File upload option
upload_max_filesize = 500M; upload file upper limit
If you want to upload a larger file, only the above two is not enough, the server cache must be the upper limit, the script maximum execution time is longer
Post_max_size = 500M;p ost Upper limit
max_execution_time = 1800; Maximum execution time for each script, in seconds script maximum execution
max_input_time = 1800; Maximum amount of time each script may spend parsing request data
Memory_limit = 128M; Maximum amount of memory a script may consume (128MB) memory cap