Home  >  Article  >  Backend Development  >  PHP上传文件时文件过大$_FILES为空的解决方法_php技巧

PHP上传文件时文件过大$_FILES为空的解决方法_php技巧

WBOY
WBOYOriginal
2016-05-17 08:52:341048browse

在做图片上传的时候突然发现一张gif图片上传失败 size为0,实际大小为4.66M。上传小文件时可以,传大文件就不行,看了下PHP.INI里面upload_max_filesize = 2M, 问题就出在这了,修改其值

复制代码 代码如下:

; Maximum allowed size for uploaded files.
upload_max_filesize = 20M

重启了下nginx问题解决。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn