How to modify the upload size configuration in php.ini: 1. Enable HTTP upload file configuration and specify the temporary file storage location; 2. Modify the upload file size configuration and the maximum form reception value; 3. Restart the server.
The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.
Let us take a look at the specific steps to modify the upload file size configuration:
1. Open php.ini
1. file_uploads = on ;
Whether to allow file upload via HTTP switch, the default is ON;
2. upload_tmp_dir;
The file is uploaded to the place where temporary files are stored on the server. If it is not specified, it will Use the system's default temporary folder;
3.upload_max_filesize = 8m;
Wangwen business, that is, the maximum allowed file size for uploading, the default is 2M;
4 .post_max_size = 8m;
refers to the maximum value that can be received through POST to PHP through the form, including all values in the form, the default is 8M;
Generally, set the above four After setting the parameters, uploading files of
2. Restart the php service to make the configuration take effect
service php-fpm restart systemctl restart php-fpm
Recommended learning: php training
The above is the detailed content of How to modify the upload size configuration in php.ini. For more information, please follow other related articles on the PHP Chinese website!