]> git.mxchange.org Git - simple-upload.git/commitdiff
Use even more braces and save returned target file name
authorRoland Häder <roland@mxchange.org>
Wed, 30 Mar 2016 08:33:05 +0000 (10:33 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 30 Mar 2016 08:33:05 +0000 (10:33 +0200)
index.php

index 612d74de41b0d42a212cc69102e380977db45fff..78e5ff4f63882054d89fed80fa2b0c2909a280fc 100644 (file)
--- a/index.php
+++ b/index.php
                header('Content-type: text/plain');
                if (is_array($_FILES['file'])) {
                        $file_array = diverseArray($_FILES['file']);
-                       foreach ($file_array as $file_data)
-                               uploadFile($file_data);
+                       foreach ($file_array as $file_data) {
+                               $targetFile = uploadFile($file_data);
+                       }
                } else {
-                       uploadFile($_FILES['file']);
+                       $targetFile = uploadFile($_FILES['file']);
                }
                exit;
        }