Multifile Upload example. Multifile Upload example: upload_html.php --------------------------------------------------------------------------------------------- HTMLHEADTITLE Upload file TITLEHEADscrip multifile Upload example // upload_html.php example ---------------------------------------------------------------------------------------------
Upload files
Script
Function beforesubmit (forma)
{
Var indexnamea = forma. indexname. value;
Var upfilea = forma. upfile. value;
Var k = // g;
Var indexnamea = indexnamea. replace (k ,"");
Var upfilea = upfilea. replace (k ,"");
If (indexnamea = ""
Upfilea = "")
{
Alert ("The directory name or uploaded directory cannot be blank! ");
Return false;
}
Return true;
}
Script
// Configure //-----------------------------------------------------------------------------------------------------------------------
// Upload. php plugin -------------------------------------------------------------------------------------------------------------
// Upload_path: directory to which the file is to be uploaded
For ($ I = 1; $ I <8; $ I ++)
{
$ Upfile = "upfile". strval ($ I );
If (chop ($ indexname )! = "" And chop ($ upfile )! = "")
{
$ Upfilename = ($ upfile. "_ name ");
$ Filename = upload_path. $ upfilename;
$ Copyfile = copy ($ upfile, $ filename );
If (! $ Copyfile)
Die ("file Upload failed! ");
$ Ls_file. = $ upfilename. "\ n ";
$ Flag = 1;
}
}
If ($ flag ){
$ Ls_msg = "file \ n". $ ls_file. "uploaded successfully! ";
}
Else {
$ Ls_msg = "no file is uploaded. please reselect it! ";
}
Echo"\ N ";
Echo"\ N ";
Echo"\ N ";
Echo"\ N ";
Echo $ ls_msg. "\ n ";
Echo"\ N ";
Echo"\ N ";
?>
Upload your html head title to upload a file/TITLE/HEAD scrip...