From: s-ko Debugging information: data
';
echo '';
print_r($data);
echo '
';
- }
+
if (move_uploaded_file($data['tmp_name'], $data['upload_target_file'])) {
if ($settings['allow_deletion'])
$_SESSION['upload_user_files'][] = $data['target_file_name'];
- echo $data['pageurl'] . $data['upload_target_file'];
- exit;
+ echo $data['pageurl'] . $data['upload_target_file'] . "\n";
// echo 'File: ' . $data['uploaded_file_name'] . ' successfully uploaded:
';
// echo 'Size: '. number_format($_FILES['file']['size'] / 1024, 3, '.', '') .'KB
';
// echo 'File /URL: http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$data['upload_target_file'].'';
} else {
echo 'Error: unable to upload the file.';
- exit;
}
}
+ if (isset($_FILES['file'])) {
+ if ($settings['debug']) {
+ // Displaying debug information
+ echo 'Debugging information: data
';
+ echo '';
+ print_r($data);
+ echo '
';
+ // Displaying debug information
+ echo 'Debugging information: file
';
+ echo '';
+ print_r($_FILES);
+ echo '
';
+ }
+
+ if (is_array($_FILES['file'])) {
+ $file_array = diverse_array($_FILES['file']);
+ foreach ($file_array as $file_data)
+ UploadFile($file_data);
+ } else
+ UploadFile($_FILES['file']);
+ exit;
+ }
+
if ($settings['allow_deletion'])
if (isset($_POST))
if ($_POST['action'] === 'delete')
@@ -163,177 +194,7 @@
- Simple PHP Upload
@@ -342,7 +203,7 @@