Home > Backend Development > PHP Tutorial > [PHP]Nginx and PHP file upload size limit,_PHP tutorial

[PHP]Nginx and PHP file upload size limit,_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:19:19
Original
851 people have browsed it

[PHP] File upload size limit between Nginx and PHP,

----------------------- ------------------------------------------------@black Eye Poet www.chenwei.ws

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

 (1)post_max_size = 50M  #Maximum POST data acceptable by PHP

 (2)upload_max_filesize = 50M #Maximum value allowed for file upload

 (3)max_execution_time = 300 #Maximum execution time of each script, seconds (0 means no limit, setting 0 is not recommended)

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

 (1)client_max_body_size 50m #Client maximum upload size 50M

3. Restart PHP: /etc/init.d/php-fpm restart

4. Restart Nginx smoothly: /usr/local/nginx/sbin/nginx -s reload

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/875726.htmlTechArticle[PHP]Nginx and PHP file upload size limit, ------------- -------------------------------------------------- ---------@黑eyedpoetwww.chenwei.ws 1. Modify three items in the PHP configuration file...
Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template