Uploading large files with PHP
1. First we need to open the php.ini file
2. file_uploads = on; Switch whether to allow file upload via HTTP. The default is ON, as shown below:
##3. upload_max_filesize = 8m; as shown in the transaction, That is, the maximum allowed upload file size, the default is 2M. post_max_size = 8m, refers to the maximum value that can be received through form POST to PHP, including all values in the form, the default is 8M
Generally, after setting the above three parameters , uploading 8M, it will definitely work if you only set the above three items.
##4. max_execution_time = 600; The maximum time value (seconds) for each PHP page to run, the default is 30 seconds max_input_time = 600; The maximum time required for each PHP page to receive data, the default is 60 seconds
5, memory_limit = 8m; The maximum time required for each PHP page The maximum memory consumed is 8M by default Volume file
Recommended tutorial:
PHP video tutorialThe above is the detailed content of How to upload large files in PHP. For more information, please follow other related articles on the PHP Chinese website!