那是因为nginx限制了上传文件大小,必须指定下。
在nginx.conf的http{}中增加
client_max_body_size 20m;
增加上传大小限制
同时要修改php.ini中相关参数
[Resource Limits]
max_execution_time = 800 ; Maximum execution time of each script, in seconds由于上传大文件比较费时,所以max_execution_time设为800,默认是30
[Data Handling]
; Maximum size of POST data that PHP will accept.修改下面的数值,以增大上传文件大小,默认是8M
post_max_size = 20M
[File Uploads]
; Maximum allowed size for uploaded files.修改下面的数值,以增大上传文件大小,默认是2M
upload_max_filesize = 20M
时间: 2024-10-12 02:31:47