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);