1. 修改php配置文件中的三项:vim /usr/local/php/etc/php.ini
(1)post_max_size = 50M #PHP可接受的最大POST数据
(2)upload_max_filesize = 50M #文件上传允许的最大值
(3)max_execution_time = 300 #每个脚本的最大执行时间,秒钟(0则不限制,不建议设0)
2. 修改Nginx配置文件:vim /usr/local/nginx/conf/nginx.conf (如果忘了配置文件的具体位置,可以使用 locate nginx.conf 查找)
立即学习“PHP免费学习笔记(深入)”;
(1)client_max_body_size 50m #客户端最大上传大小 50M
3. 重启PHP:/etc/init.d/php-fpm restart
4. 平滑重启Nginx:/usr/local/nginx/sbin/nginx -s reload
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号