Home > Backend Development > PHP Tutorial > PHP upload large file setting method, _PHP tutorial

PHP upload large file setting method, _PHP tutorial

WBOY
Release: 2016-07-12 08:54:18
Original
892 people have browsed it

How to set up large files in php,

Open php.ini, first find

;;;;;;;;;;;;;;;;;;
; file uploads ;
;;;;;;;;;;;;;;;;;

area, the following parameters affect file upload:

file_uploads  =  on  ;//是否允许通过http上传文件的开关。默认为on即是开

upload_tmp_dir  ;//文件上传至服务器上存储临时文件的地方,如果没指定就会用系统默认的临时文件夹

upload_max_filesize  =  8m  ;//望文生意,即允许上传文件大小的最大值。默认为2m

Copy after login

at
;;;;;;;;;;;;;;;;;;
; data handling ;
;;;;;;;;;;;;;;;;;;
Region, and one more item:

post_max_size  =  8m ;//指通过表单post给php的所能接收的最大值,包括表单里的所有值。默认为8m

Copy after login

Generally, after setting the above four parameters, uploading a file of <=8m is not a problem, as long as the network is normal.

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 an upload speed of 100m/s, you still have to care about the following parameters:

;;;;;;;;;;;;;;;;;;;;;;
; resource limits ;
;;;;;;;;;;;;;;;;;;;;;

max_execution_time  =  600 ;//每个php页面运行的最大时间值(秒),默认30秒

max_input_time = 600 ;//每个php页面接收数据所需的最大时间,默认60秒

memory_limit  =  8m ;//每个php页面所吃掉的最大内存,默认8m
Copy after login

Articles you may be interested in:

  • apache php uploads large files, taking uploading 100M as an example
  • PHP fastcgi mode uploads large files (about 300K) and reports an error
  • Reasons and countermeasures for PHP’s failure to upload large files

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1120927.htmlTechArticlephp upload large file setting method, open php.ini, first find;;;;;;;;;; ;;;;;; ; file uploads ; ;;;;;;;;;;;;;;;; area, the following parameters that affect file upload: file_upload...
Related labels:
php
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