Hi PaulARLowe,
Please try the example below, the red code will fire for each file. and you can get the upload file name by $mvcfile->FileName.
- <?php require_once "phpuploader/include_phpuploader.php" ?>
- <?php session_start(); ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- example
- </title>
- <link href="demo.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <form id="form1" method="POST">
- <?php
-
- $uploader=new PhpUploader();
- $uploader->MaxSizeKB=10240;
- $uploader->MultipleFilesUpload=true;
- $uploader->Name="myuploader";
- $uploader->InsertText="Select multiple files (Max 10M)";
- $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.bmp,*.txt,*.zip,*.rar";
- $uploader->Render();
-
- ?>
-
- <br/><br/><br/>
-
- <?php
-
- $files=array();
-
- $processedlist=@$_POST["processedlist"];
- if($processedlist)
- {
- $guidlist=explode("/",$processedlist);
- foreach($guidlist as $fileguid)
- {
- $mvcfile=$uploader->GetUploadedFile($fileguid);
- if($mvcfile)
- {
- array_push($files,$mvcfile);
- }
- }
- }
- $fileguidlist=@$_POST["myuploader"];
- if($fileguidlist)
- {
- $guidlist=explode("/",$fileguidlist);
- foreach($guidlist as $fileguid)
- {
- $mvcfile=$uploader->GetUploadedFile($fileguid);
- if($mvcfile)
- {
-
-
-
- if($processedlist)
- $processedlist= $processedlist . "/" . $fileguid;
- else
- $processedlist= $fileguid;
-
- array_push($files,$mvcfile);
- }
- }
- }
-
- if(count($files)>0)
- {
- foreach($files as $mvcfile)
- {
-
-
- $mvcfile->CopyTo("D:/sites/phpuploader/test/".$mvcfile->FileName);
- }
- }
-
- ?>
-
- </form>
-
- </body>
- </html>
Regards,
Ken