Home > Backend Development > PHP Tutorial > How to correctly formulate PHP settings for uploading large files_PHP Tutorial

How to correctly formulate PHP settings for uploading large files_PHP Tutorial

WBOY
Release: 2016-07-15 13:33:04
Original
907 people have browsed it

We are writing

Open php.ini, first find

;;;;;;;;;;;;;;;;
; File Uploads ;
file_uploads = on ; Switch whether to allow file uploads via HTTP. The default is ON, that is,

upload_tmp_dir; files are uploaded to the server where temporary files are stored. If not specified, the system default temporary folder will be used

upload_max_filesize = 8m; Wangwen Business , that is, the maximum allowed upload file size. The default is 2M

in

;;;;;;;;;;;;;;;;;;;

; Data Handling ;

;;;;;;; ;;;;;;;;;;

area, there is another item:

post_max_size = 8m; refers to the maximum value that can be received through form POST to PHP, including in the form all values. The default is 8M

Generally, after setting the above four parameters, uploading files of

But if you want to upload a large file >8M, the above four items of PHP large file upload settings will definitely work. Unless your network really has an upload speed of 100M/S, you still have to care about the following parameters:

;;;;;;;;;;;;;;;;;;;

; Resource Limits ;

;;;;;;;;;;;;;;;;;;;;;

max_execution_time = 600 ;Maximum time value for each PHP page to run (seconds), default 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 consumed by each PHP page, the default is 8M

The above are the relevant methods for uploading large files in PHP.


http://www.bkjia.com/PHPjc/446085.html

www.bkjia.com

http: //www.bkjia.com/PHPjc/446085.htmlTechArticleWe are writing to open php.ini, first find;;;;;;;;;;;;;; ;; ; File Uploads ; ;;;;;;;;;;;;;;;; area, the following parameters that affect PHP upload large file settings: file_uploads = on...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template