Клиент:
afterUploadAll: function (obj)
{
$('.ajax-file-upload-statusbar').remove();
$.ajax({
cache: false,
url: "../php/foto_load.php",
dataType: "json",
data: {
patient: patient_for_blank.split(" ")[0] + "_" + patient_for_blank.split(" ")[1] + "_" + patient_for_blank.split(" ")[2],
enter_day: enter_day_for_blank
},
success: function (data)
{
for (var i = 0; i < data.length; i++)
{
obj.createProgress(data[i].name, data[i].path, data[i].size);
}
}
});
}
Сервер:
<?php
//
$patient_dir = iconv("UTF-8", "CP1251", $_POST['patient'])."_".($_POST['enter_day']);
$dir = "../images/$patient_dir";
$files = scandir($dir);
$ret = array();
foreach ($files as $file) {
if ($file == "." || $file == "..") {
} else {
$filePath = $dir . "/" . $file;
$details = array();
$details['name'] = $file;
$details['path'] = $filePath;
$details['size'] = filesize($filePath);
$ret[] = $details;
}
}
echo json_encode($ret);
Никак не могу понять где ошибка.