modify PHP upload file size limit Modify the PHP upload file size limit method 1. general file uploads, unless the file is small. Like a 5M file, it's likely to take more than a minute to upload. In PHP, however, the default maximum execution time for this page is 30 seconds. That means more than 30 seconds, the script stops executing. This results in a situation where the Web page cannot be opened. At this point we can modify Max_execution_time . Finding Max_execution_time in php.ini is 30 seconds by default. Instead of Max_execution_time = 0, 0 means no limit . 2. Modify Post_max_size to set the maximum allowable size for post data. This setting also affects file uploads. The PHP default post_max_size is 2M. If the POST data size is larger than post_max_size $_post and $_files superglobals will be empty post_max_size. Change to Post_max_size = 150M 3: But the maximum is still 8M when uploading the file. We're going to change a parameter. upload_max_filesize indicates the maximum size of the uploaded file. Find Upload_max_filesize, default is 8M to Upload_max_filesize = 100M In addition, Post_max_size is better than upload_max_filesize. After modifying the above parameters, in the normal circumstances allowed by the network, you can upload a large volume of files Max_execution_time = Max_input_time = Memory_limit = 32m File_uploads = on Upload_tmp_dir =/tmp Upload_max_filesize = 32m Post_max_size = 32m |
Modify PHP Upload file size limit