Home > Article > Backend Development > How to modify file upload size in php?
How to modify the file upload size in php: First, find the file in Linux, the code is [find/-name php.ini]; then use xftp to download it to the local, modify and replace; finally enable reboot to restart nginx.
How to modify the file upload size in php:
Modify the upload_max_filesize = 100M in the php.ini file
and post_max_size = 100M
, then the question is, how do I know where this file is?
linux file search command:
find / -name php.ini
Okay, if you know where the file is, just modify it, but modifying it through the shell is too troublesome. Use xftp to download it locally, modify it and then replace it. It is much more convenient.
After modifying and replacing it, Modify another place:
#The following is a screenshot of another chapter. I modified it to 100M. You can adjust the size according to your own needs. Just know where to modify it.
Then restart nginx. If you don’t know how to start it, just reboot. It’s simple and crude.
Related learning recommendations: PHP programming from entry to proficient
The above is the detailed content of How to modify file upload size in php?. For more information, please follow other related articles on the PHP Chinese website!