关于 PHP 程序上传限制

更改 php.ini 配置文件

upload_max_filesize = 5M
post_max_size = 16M

通过 nginx 环境限制上传大小:

可以在 httpd { } 模块, server { } 模块,location { } 模块进行设置;

http { } 模块 是控制着所有nginx收到的请求。
server { } 模块,则控制该server收到的请求报文大小,
location { } 模块,只对匹配了location 路由规则的请求生效。

client_max_body_size 5m;
client_body_buffer_size 128k;

 

相关文章:

  • 2021-11-20
  • 2021-08-25
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
猜你喜欢
  • 2021-11-20
  • 2021-07-14
  • 2021-11-20
  • 2022-02-10
  • 2021-12-02
  • 2021-10-04
  • 2022-12-23
相关资源
相似解决方案