Home  >  Article  >  php教程  >  PHP上传文件时文件过大$_FILES为空的解决方法

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

WBOY
WBOYOriginal
2016-06-06 20:26:171552browse

发现一张gif图片上传失败 size为0,实际大小为4.66M,下面为大家介绍下PHP上传文件时文件过大的解决方法

在做图片上传的时候突然发现一张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