Nginx + PHP + Swfupload upload large files

Source: Internet
Author: User
: This article mainly introduces how to upload large files through Nginx + PHP + Swfupload. if you are interested in the PHP Tutorial, refer to it. Environment: LNMP, the upload plug-in Swfupload. when you need to upload large files, we need to make some settings, because Nginx php and swfupload have relatively small Upload sizes by default. Set the following size according to the access order

1. Swfupload configuration, modify

File_size_limit: "100 MB", // The file size file_types :"*. * ", // file_types_description:" All Files ", file_upload_limit: 0, file_queue_limit: 20,
2. Nginx: modify nginx. conf. add or modify the following options. if this option fails, error 413 is returned.

Client_max_body_size100m;

3. PHP: modify php. ini, and the number of php modifications will increase.

Max_execution_time = 600 // maximum execution time
Max_input_time= 600
Memory_limit = 100 m
File_uploads = on // enable Upload
Upload_tmp_dir =/tmp // Upload Directory
Upload_max_filesize = 100 m // upload size limit
Post_max_size = 100 m // post Upload size limit

4. if you have modified 2 or 3 items, restart nginx.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above describes how to upload large files through Nginx + PHP + Swfupload, including some content. I hope my friends who are interested in PHP tutorials will be helpful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.