1. Open php. ini (not to mention opening the method, Baidu has a lot)
2. Search for post_max_size
Maximum form submission value. This parameter is not used to restrict the size of a single file to be uploaded, but is used to restrict the submitted data of the entire form.
The default value is 8 MB and is set to the value you need. We recommend that you set this parameter to a value larger than upload_max_filesize.
3. Search for File Uploads
Whether to allow file upload over http. Check whether file_uploads = on
4. Find upload_tmp_dir.
The file is uploaded to the place where the temporary file is stored on the server. If it is not specified, the default temporary folder will be used.
If the system reports an error message indicating "XXX temporary directory XXX", you need to set a valid directory for this directory.
5. Find upload_max_filesize
Maximum file size allowed to be uploaded. The default value is 2 MB. Set this parameter to the value you need. We recommend that you do not set this parameter to exceed the value of post_max_size because it is controlled by the value of post_max_size (even if the value of upload_max_filesize is, if post_max_size is set to 2 MB, files larger than 2 MB cannot be uploaded because it is controlled by the value of post_max_size)
6. If you want to upload a file larger than 8 m, you also need to set the following parameters:
Query max_execution_time = 600; maximum time (in seconds) for running each PHP page. The default value is 30 seconds.
Max_input_time = 600; maximum time required for receiving data on each PHP page. The default value is 60 seconds.
Memory_limit = 8 M; maximum memory required for each PHP page. The default value is 8 M.
If you are Nginx, you also need to modify the http segment in nginx. conf:
Client_max_body_size 1024 m; # Here is 1024 MB.