How to set the file upload size in php: first open the php.ini configuration file; then find the upload_max_filesize configuration; finally modify the value of the configuration to 8M, that is, the maximum allowed upload file size is 8M.
First open the php.ini configuration file, and then configure it as follows:
(Recommended tutorial: php graphic tutorial)
1. file_uploads = on ;
Whether to allow file uploading via HTTP switch, the default is ON;
2. upload_tmp_dir;
Files are uploaded to the place where temporary files are stored on the server. If not specified, the system default temporary folder will be used;
3. upload_max_filesize = 8m;
Maximum file size allowed to be uploaded Value, the default is 2M;
(Video tutorial recommendation: php video tutorial)
4. post_max_size = 8m;
refers to the form POST The maximum value that PHP can receive, including all values in the form, defaults to 8M;
Generally, after setting the above four parameters, uploading a file of
The above is the detailed content of How to set file upload size in php. For more information, please follow other related articles on the PHP Chinese website!