PHP development in the upload is very common is also very important point, and PHP upload size is limited, in order to better PHP upload speed, we have to modify the upload size limit, OK! Let's take a look at how to modify the PHP upload limit!
Generic 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.
Then we can modify the Max_execution_time
Look in the php.ini.
Max_execution_time
The default is 30 seconds. Change to
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.
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.
Find Post_max_size. instead
Post_max_size = 150M
3. A lot of people will change the second step. However, the maximum upload file is still 8M.
Why, we're going to change one. The parameter upload_max_filesize indicates the maximum size of the uploaded file.
Find Upload_max_filesize, default to 8M instead
Upload_max_filesize = 100M
It is also stated that the post_max_size is better than upload_max_filesize.
More Articles to upload:
In the PHP program, often encounter this problem, upload attachments obviously successfully uploaded a lot of attachments, tablets, etc., but in fact there are only 20 attachments, or direct error can not be uploaded.
How to break the max_file_uploads limitation problem of uploading multiple files in PHP
This article mainly introduces the Zen path attachment size limit, PHP upload file size limit, for the PHP tutorial interested students can refer to.
Zen Path attachment size limit, PHP upload file size limit