event_obj.dataTransfer.setData("id", event_obj.target.id);
.event_obj.target.appendChild(document.getElementById(event_obj.dataTransfer.getData('id'));
$_FILES
- HTTP file upload variable$_FILES['name_sent_from_client']['name']
$_FILES['name_sent_from_client']['type']
$_FILES['name_sent_from_client']['tmp_name']
$_FILES['name_sent_from_client']['size']
$_FILES['name_sent_from_client']['name'][$i]
$_FILES['name_sent_from_client']['type'][$i]
$_FILES['name_sent_from_client']['tmp_name'][$i]
$_FILES['name_sent_from_client']['size'][$i]
boolean is_array($_FILES['name_sent_from_client']['name'])
<?php $target_dir = "uploads/"; // This directory should be accessible and writable for the web server. echo "The number of files to upload is " . count($_FILES['fileToUpload']['name']) . '.<br>'; // full path // 'fileToUpload[]' is the name of file type <input> in the client code. for ($i = 0; $i < count($_FILES['fileToUpload']['name']); $i++) { $target_file = $target_dir . basename($_FILES['fileToUpload']['name'][$i]); // basename() - just file name if (!file_exists($target_file)) { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"][$i], $target_file)) echo "The file " . basename( $_FILES["fileToUpload"]["name"][$i]) . " has been uploaded.<br>"; else echo "Sorry, there was an error uploading your file.<br>"; } else echo $target_file . ' already exists.<br>'; } ?>