? Php // multi file upload system Full version // powerful function, can be arbitrary control the number of uploaded files, whether shrouded // Author: nagging // mailbox: pjzhp@263.netinclude (".. /include/common. inc "); $ title =" upload programs for multiple files "; include (".. /include/he // Full version of multifile Upload system
// Powerful, can control the number of uploaded files, whether or not
// Prepared by: Haran
// Mailbox:
Pjzhp@263.net
Include ('../include/common. inc ');
$ Title = 'upload programs for multiple Files ';
Include ('../include/header. inc ');
// Define the number of objects to be uploaded
Define ('upload _ no', 10 );
Echo ('
Welcome!
You can upload up to '. UPLOAD_NO.' files at a time.
N ');
If ($ REQUEST_METHOD! = 'Post '){
Echo ('N ');
}
Else {
// Process Upload
$ Noinput = true;
For ($ I = 1; $ noinput & ($ I <= UPLOAD_NO); $ I ){
If ($ {'file'. $ I }! = 'None') $ noinput = false;
}
If ($ noinput ){
Echo ('No selected file, return retry ');
Exit ();
}
Echo ('
The selected file has been successfully uploaded to the temporary directory on the server!
');
Echo ('
File number |
File name |
File size |
');For ($ I = 1; $ I <= UPLOAD_NO; $ I ){$ Just =$ {'file'. $ I. '_ size '};$ Fp_size [I] = $ just;If ($ overload! = ON ){If (file_exists (AddSlashes (dirname ($ PATH_TRANSLATED). '\ upload \'. $ {'file'. $ I. '_ name '}))Echo 'file you uploaded '. $ {'infile'. $ I.' _ name'}. 'already exists. An error occurred while copying the file!';Else{If ($ {'file'. $ I }! = 'None '&? ($ {'File '. $ I}, AddSlashes (dirname ($ PATH_TRANSLATED )). '/upload /'. $ {'file '. $ I. '_ name'}) & unlink ($ {'infile '. $ I })){