From: Roland Häder Date: Wed, 30 Mar 2016 08:33:05 +0000 (+0200) Subject: Use even more braces and save returned target file name X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=145a7ae77e4b1750eb4fcc16c453f3fd1a63b607;p=simple-upload.git Use even more braces and save returned target file name --- diff --git a/index.php b/index.php index 612d74d..78e5ff4 100644 --- a/index.php +++ b/index.php @@ -245,10 +245,11 @@ 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; }