Home > Backend Development > PHP Tutorial > Nginx+PHP+Swfupload upload large files

Nginx+PHP+Swfupload upload large files

WBOY
Release: 2016-08-08 09:19:38
Original
1075 people have browsed it

Environment: LNMP, upload plug-in Swfupload, when we need to upload large files, we need to make some settings, because the default upload sizes of Nginx php and swfupload are relatively small. Next, set the size according to the access sequence

1.Swfupload configuration, modify

<span style="white-space:pre">	</span>file_size_limit : "100 MB", //允许上传文件大小
	file_types : "*.*",			// 上传文件类型
	file_types_description : "All Files",
	file_upload_limit : 0,
	file_queue_limit : 20,
Copy after login
2.Nginx, modify nginx.conf, add or modify the following options, this will not pass, and a 413 error will be reported

client_max_body_size100m;

3.PHP, modify php.ini, the number of php modification items will be more

max_execution_time = 600 //Maximum execution time
max_input_time = 600
memory_limit = 100m
file_uploads = on //Enable upload
upload _tmp_dir = /tmp //Upload directory
upload_max_filesize = 100m //Upload size limit
post_max_size = 100m //Post upload size limit

4. Finished, if modified If items 2 and 3 are found, please restart nginx

Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.

The above introduces Nginx+PHP+Swfupload to upload large files, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template