Home  >  Article  >  Backend Development  >  What should I do if no files are uploaded in php?

What should I do if no files are uploaded in php?

藏色散人
藏色散人Original
2021-10-29 10:15:101996browse

Solution to php when no files are uploaded: 1. Modify php.ini and set the size of the uploaded file; 2. Add "php_value upload_max_filesize "300M"" to httpd.conf; 3. Restart the server. .

What should I do if no files are uploaded in php?

The operating environment of this article: Windows 7 system, thinkphp v5.1 version, DELL G3 computer

What should I do if no files in php are uploaded? ?

ThinkPhp prompts "No uploaded files" when uploading files. Solution

Using the ThinkPhp framework to upload small image files successfully, but uploading large files fails.

Later I found the reason, it was because PHP limited the size of the uploaded file. I modified the php.ini configuration as follows:

upload_max_filesize = 300M
post_max_size = 300M

Restarted the server, but the problem was still the same and the problem was not solved.

The solution is as follows, add the following to httpd.conf:

php_value upload_max_filesize "300M"
php_value post_max_size "300M"

Restart the server again, OK!

Recommended learning: "PHP Video Tutorial

The above is the detailed content of What should I do if no files are uploaded in php?. For more information, please follow other related articles on the PHP Chinese website!

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
Previous article:How to modify word in phpNext article:How to modify word in php