Php+nginx upload Large files nginx apache nginx php nginx rewrite

Source: Internet
Author: User
Modify PHP configuration file

Parameter setting description
vi php.ini
file_uploads on #是否允许通过HTTP上传文件的开关。默认为ON即是开
upload_tmp_dir – #文件上传至服务器上存储临时文件的地方,如果没指定就会用系统默认的临时文件夹
upload_max_filesize 8m #允许上传文件大小的最大值。默认为2M
post_max_size 8m #通过表单POST给PHP的所能接收的最大值,包括表单里的所有值。默认为8M

Description
Generally speaking, after setting up the above four parameters, it is not a problem to upload <=8m files under normal network conditions.
However, if you want to upload a large file of >8m, it is not necessarily possible to set the above four items. Unless your network really has a 100m/s upload speed, you still have to set the following parameters.
max_execution_time 600 #每个PHP页面运行的最大时间值(秒),默认30秒
max_input_time 600 #每个PHP页面接收数据所需的最大时间,默认60秒
memory_limit 8m #每个PHP页面所吃掉的最大内存,默认8M

Webserver with Nginx, in nginx.conf a parameter:
client_max_body_size 30m; #默认1M
重启

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('

  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Php+nginx upload large files, including nginx aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.