How to upload large files in PHP

王林
Release: 2023-02-24 14:46:01
Original
13306 people have browsed it

How to upload large files in PHP

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:

How to upload large files in PHP

How to upload large files in PHP

##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.

How to upload large files in PHP

##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

How to upload large files in PHP

5, memory_limit = 8m; The maximum time required for each PHP page The maximum memory consumed is 8M by default Volume file

How to upload large files in PHPRecommended tutorial:

PHP video tutorial

The 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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!