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. .
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!