<?php
define('ROOTPATH', dirname(__DIR__) . '\\upload\\');
$result = '';
$property_images = $_FILES['fileToUpload']['name'];
if (!empty($property_images)) {
for ($up = 0; $up < count($property_images); $up++) {
if (move_uploaded_file($_FILES['fileToUpload']['tmp_name'][$up], ROOTPATH . $_FILES['fileToUpload']['name'][$up])) {
echo $result = "OK";
}
}
} else {
echo $result = "Nada";
}
?>
define('ROOTPATH', dirname(DIR) . '\upload\'); $result = ''; $property_images = $_FILES['fileToUpload']['name']; if (!empty($property_images)) { for ($up = 0; $up < count($property_images); $up++) { if (move_uploaded_file($_FILES['fileToUpload']['tmp_name'][$up], ROOTPATH . $_FILES['fileToUpload']['name'][$up])) { echo $result = "OK"; } } } else { echo $result = "Nada"; } ?>