Home  >  Article  >  Backend Development  >  Solution to the problem that $_FILES is empty when uploading files in PHP_PHP Tutorial

Solution to the problem that $_FILES is empty when uploading files in PHP_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:17:451020browse

When I was uploading pictures, I suddenly found that a gif picture failed to upload. The size was 0, and the actual size was 4.66M. It works when uploading small files, but not when uploading large files. I looked at upload_max_filesize = 2M in PHP.INI. This is where the problem lies. Modify its value

Copy code The code is as follows:

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

Restarting nginx solved the problem.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/621722.htmlTechArticleWhile uploading images, I suddenly found that a gif image failed to upload with size 0 and the actual size was 4.66M. It works when uploading small files, but not when uploading large files. Check the upload_...
in PHP.INI
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