Home > Backend Development > PHP Tutorial > PHP upload large file settings_PHP tutorial

PHP upload large file settings_PHP tutorial

WBOY
Release: 2016-07-13 17:39:18
Original
1040 people have browsed it

Open php.ini and first find
;;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;;
Area, has the following parameters that affect file upload:

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

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 ; As expected, that is, the maximum size of the file allowed to be uploaded. Default is 2M


in
;;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;;
Region, and one more item:

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


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

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

;;;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;;;

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 consumed by each PHP page, default 8M

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486312.htmlTechArticleOpen php.ini, first find;;;;;;;;;;;;;;;;; File Uploads ; ;;;;;;;;;;;;;;;;; area, the following parameters affecting file upload: file_uploads = on ;Whether to allow uploading via HTTP...
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