我在 php.ini 中增加了 params 值:
upload_max_filesize = 10M
post_max_size = 12M
Run Code Online (Sandbox Code Playgroud)
而php --ini
在控制台命令显示我:
post_max_size => 12M => 12M
upload_max_filesize => 10M => 10M
Run Code Online (Sandbox Code Playgroud)
但无论如何,当我尝试发送大于 1mb 的文件时,我会出错。在 nginx 日志中,我看到:
2017/06/03 12:06:40 [error] 16254#16254: *7 client intended to send too large body: 1778665 bytes
Run Code Online (Sandbox Code Playgroud)
fastcgi_param PHP_VALUE "upload_max_filesize = 10M \n post_max_size=12M"
在 nginx conf 中也没有帮助。
那么,如何增加最大上传文件大小?