Home  >  Article  >  Backend Development  >  PHP upload file size is limited? Teach you how to change it!

PHP upload file size is limited? Teach you how to change it!

WBOY
WBOYOriginal
2016-07-25 08:50:30938browse
1.Open php.ini

2. Find post_max_size (the maximum value for form submission, this item does not limit the size of a single uploaded file, but limits the submission data of the entire form); the default is 8M, set it to the value you need

3. Find File Uploads (switch to allow uploading files via http); confirm file_uploads = on

4. Find upload_tmp_dir (files are uploaded to the place where temporary files are stored on the server. If not specified, the system default temporary folder will be used); it can be set to the directory you need

5. Find upload_max_filesize (the maximum value of file size allowed to be uploaded); the default is 2M, set it to the value you need

6. If you want to upload files larger than 8M, you also need to set the following parameters:
Look for 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
memory_limit = 8M; The maximum memory required by each PHP page, the default is 8M

7. Restart the web server.




Honglin Data Communication (hlidc.com)——Professional website construction, website promotion, website filing, domain name registration, cloud computing, server, VPS host, corporate post office, 400 phone number, etc.Enterprise informationization one Stop service

Please Q23325308 for details


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