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

藏色散人
Release: 2023-03-13 15:14:02
Original
2088 people have browsed it

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
Copy after login

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"
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template