配置php.ini文件 (以上传500M以下大小的文件为例) 
查找以下选项并修改-> 
file_uploads = On ;打开文件上传选项 
upload_max_filesize = 500M ;上传文件上限 


如果要上传比较大的文件,仅仅以上两条还不够,必须把服务器缓存上限调大,把脚本最大执行时间变长 
post_max_size = 500M ;post上限 
max_execution_time = 1800 ; Maximum execution time of each script, in seconds脚本最大执行时间 
max_input_time = 1800 ; Maximum amount of time each script may spend parsing request data 
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)内存上限

 

 

nginx.conf 添加 client_max_body_size 

  1. location / {  
  2.             root   html;  
  3.             index  index.html index.htm;  
  4.             client_max_body_size    1000m;  
  5.   }  

相关文章:

  • 2021-11-14
  • 2021-06-08
  • 2021-11-24
  • 2021-05-19
  • 2021-10-12
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2021-10-12
  • 2021-07-16
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案