[PHP] Nginx file upload size limit with PHP, _php tutorial

Source: Internet
Author: User
Tags php file upload

[PHP] Nginx and php file upload size limit,


-----------------------------------------------------------------------@ Black-eyed poet www.chenwei.ws

1. Modify the three items in the PHP configuration file: Vim/usr/local/php/etc/php.ini

(1) post_max_size = 50M #PHP可接受的最大POST数据

(2) upload_max_filesize = 50M #文件上传允许的最大值

(3) Max_execution_time = #每个脚本的最大执行时间, seconds (0 is not limited, not recommended 0)

2. Modify Nginx configuration file: vim/usr/local/nginx/conf/nginx.conf (If you forget the location of the configuration file, you can use locate nginx.conf find)

(1) client_max_body_size 50m #客户端最大上传大小 50M

3. Restart PHP:/ETC/INIT.D/PHP-FPM restart

4. Smooth Restart Nginx:/usr/local/nginx/sbin/nginx-s Reload

----------------------------------------------------------------------------------------------------




http://www.bkjia.com/PHPjc/875726.html www.bkjia.com true http://www.bkjia.com/PHPjc/875726.html techarticle [Php]nginx with PHP file upload size limit,-----------------------------------------------------------------------@ Black eyed poet Www.chenwei.ws 1. Modify three items in PHP config file ...

  • 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.