PHP upload file code implementation of native JS upload large file display progress bar example

Source: Internet
Author: User
This article mainly for you in detail the JS native upload large file display progress bar, PHP upload file key code, with a certain reference value, interested in small partners can refer to

JS Native upload large file display progress bar, PHP upload files for your reference, the specific content as follows

In php.ini, modify the required size:

Upload_max_filesize = 8M
Post_max_size = 10M
Memory_limit = 20M


<! DOCTYPE html>


<?php  //start uploading  //Note: Files are files of Windows system, using GBK encoding, PHP files using utf-8 encoding  //We can not directly modify the encoding of the file, can only temporarily modify the code  of PHP $DST _file = $_files[' file ' [' name '];  $DST _file = iconv (' utf-8 ', ' GBK ', $dst _file);  if (move_uploaded_file ($_files[' file ' [' Tmp_name '], $DST _file)) {    $data [' status '] = 1;  } else{    $data [' status '] = 0;  }  echo Json_encode ($data);

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: info-contact@alibabacloud.com 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.