0
我已經和陣列的文件,像這樣:追加文件數組形式的數據
Array (4)
File {name: "1.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 76669, type: "image/jpeg", slice: function}
File {name: "2.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 85341, type: "image/jpeg", slice: function}
File {name: "3.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 46841, type: "image/jpeg", slice: function}
File {name: "4.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 89657, type: "image/jpeg", slice: function}
我不能這個數組只是追加到FORMDATA對象,然後將其發送到我的PHP腳本來處理?
例如:
data.append("files[]", files_to_upload);
或者我把檔案陣列必須循環,並分別添加每個文件?
應該在你的PHP作爲'$ _FILES'可供選擇:http://php.net/manual/en/reserved.variables.files.php –