Home >Backend Development >PHP Tutorial >Let you upload 1000 files at the same time (1)_PHP tutorial
Prerequisite knowledge: Javascript, PHP (a small amount)/Perl (a small amount)!
Test environment: Windows2000 + IIS5 + PHP (Win98 + PWS + PHP3 failed, probably due to a configuration problem)
Directory structure:
/cgi-bin/fileup.php (File reception)
/www/test/phpfileup.htm (File submission)
/www/test/tmp/ (Default saving directory)
Foreword: File uploading is simple and troublesome. The following is the submission page for uploading files. Using this page, you can not only generate 1000 upload file boxes (actually any number of 0~n), but also indicate their saving paths respectively.
The file input box on the submission page is named: file0,file1,...file100,...fileN
The file path box on the submission page is named: path0,path1,...path100,.. .pathN
Since the generation of the page is very simple, I won’t explain it here. Two functions are defined in javascript, check() is used to submit the page, and create() is used to generate the file upload box. If you have any better suggestions or questions, please email: gearsoft@netease.com
phpfileup.htm
------------------ ---------------------------------------------
< head>
:verdana;font-size:14.8px;size:400}