Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body bgcolor="#4a4a4a">
- <div style="text-align:center">
- <?php
- //Loop through each file
- for($i=0; $i<count($_FILES['upload']['name']); $i++) {
- //Get the temp file path
- $tmpFilePath = $_FILES['upload']['tmp_name'][$i];
- $DirName = "" . $_POST['list'];
- //Make sure we have a filepath
- if ($tmpFilePath != "" && $DirName !="" ){
- //Setup our new file path
- $newFilePath = "./" . $_POST['list'] . "/" . $_FILES['upload']['name'][$i];
- $FileName = "" . $_FILES['upload']['name'][$i];
- //Upload the file into the temp dir
- if(move_uploaded_file($tmpFilePath, $newFilePath)) {
- //Handle other code here
- printf ("Uploaded $FileName to $DirName <br>");
- }
- } else { printf ("Error <br>");
- printf ("Make sure a file and name are selected<br>");
- }
- }
- { printf ('<br><b>Uploads will take up to 15 minutes to show.</b><br>');
- printf ('<br><a style="color: #b3b3b3" href="..">Return to Home</a>');
- }
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement