Código:
Warning :count():Parameter must be an array or an object that implements Countable in c://DIRECCIONDELPHP ONLINE 15
Código
Y aqui esta como quiero saber cuantos archivos hay
$(document).ready(function() { $('#files').click(function() { var attachments = document.getElementById('archivo'); var data = new FormData(); for (i = 0; i < attachments.files.length; i++) { data.append('file', attachments.files[i]); console.log(attachments.files[i]); } $.ajax({ data: data , url: "subida.php", type: "POST", contentType: false, processData: false, success: function (r) { alert('' + r); } }); }); });
Código
for ($i = 0; $i < $count; $i++) { echo 'Nombre: '.$_FILES['file']['name'][$i].'<br/>'; }