How to correctly develop PHP upload large file Settings _php tutorial

Source: Internet
Author: User
Tags form post
We are writing

Open PHP.ini, first find

; File uploads;

Area, there are several parameters that affect the PHP upload large file settings:

File_uploads = on; switch to allow uploading of files over HTTP. The default is on, which is open

Upload_tmp_dir; files uploaded to the server where temporary files are stored, if not specified, will use the system default temporary folder

Upload_max_filesize = 8m; Hope business, that is, the maximum size allowed to upload files. Default is 2M


; Data handling;

Area, there is one more:

Post_max_size = 8m; The maximum value that can be received by the form Post to PHP, including all values in the form. Default is 8M

Generally, after setting the above four parameters, uploading <=8m files is not a problem, in the network normal situation.

However, if you want to upload a large volume of >8m files, PHP upload large file settings of the above four will certainly be able to pass. Unless your network really 100m/s upload high speed, otherwise you have to care about the following parameters:

; Resource Limits;

Max_execution_time = 600; maximum time value per php page (seconds), default 30 seconds

Max_input_time = 600; The maximum time required for each PHP page to receive data, default 60 seconds

Memory_limit = 8m; max memory consumed per PHP page, default 8M

The above is the PHP upload large file settings related methods. true techarticle We are writing open php.ini, first find;;;;;;;;;;;;;;;;; File uploads;;;;;;;;;;;;;;;;; Area, there are several parameters that affect the PHP upload large file settings: File_uploads = on ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.