-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload.php
More file actions
23 lines (19 loc) · 770 Bytes
/
upload.php
File metadata and controls
23 lines (19 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
include('verifco.php');
if(connected()) {
if(check($_FILES) and check($_POST)) {
if(check($_POST['src'])) {
if ($_FILES["file"]["error"] > 0) {
echo $_FILES["file"]["error"];
} else {
$dir = $_SERVER['DOCUMENT_ROOT'] . sec($_POST['src']);
for($i = 0; $i < count($_FILES['files']['name']); $i++) {
$filename = $_FILES['files']['name'][$i];
move_uploaded_file($_FILES["files"]["tmp_name"][$i], $dir . $filename);
}
echo "done";
}
} else { echo 'Script error modified'; }
} else { echo 'No files or no destination'; }
} else { echo 'Not connected, please reconnect'; }
?>