Home  >  Article  >  CMS Tutorial  >  How to upload large files to Empire CMS

How to upload large files to Empire CMS

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-07-11 17:43:104069browse

How to upload large files to Empire CMS

1. General file upload, unless the file is very small. Like a 5M file, it will probably take more than a minute to upload.

But in php, the default maximum execution time of this page is 30 seconds. That is to say, if it exceeds 30 seconds, the script will stop executing.

This results in the inability to open the web page. At this time we can modify max_execution_time

Find

max_execution_time

The default is 30 seconds, change it to

max_execution_time = 0

0 means No

related recommendations: "CMS Tutorial"

2. Modify post_max_size to set the maximum size allowed for POST data. This setting also affects file uploads.

The default post_max_size of php is 2M. If the POST data size is greater than post_max_size $_POST and $_FILES superglobals will be empty.

Look for post_max_size and change it to
post_max_size = 150M

3. Many people will change the second step, but the maximum size when uploading files is still 8M.

why? We also need to change a parameter upload_max_filesize to indicate the maximum size of the uploaded file.

Look for upload_max_filesize, the default is 8M and change it to
upload_max_filesize = 100M

In addition, it should be noted that post_max_size is better than upload_max_filesize.

The above is the detailed content of How to upload large files to Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to install empirecmsNext article:How to install empirecms