1. In addition to type="file", add name="file" to the input, otherwise $_FILES is empty, and the name value of the input is to distinguish each input
2.var formdata = new FormData($("#form")[0]); 或者var formdata = new FormData(document.getElementById("form"));
$("#form")[0] represents the form object.
FormData() represents the information in the entire form, packaged into an object, if you need to add object properties (get parameters)
formdata.append('gid',data);
3.array_keys() returns an array of key names
1. In addition to type="file", add name="file" to the input, otherwise $_FILES is empty, and the name value of the input is to distinguish each input
2.var formdata = new FormData($("#form")[0]); 或者var formdata = new FormData(document.getElementById("form"));
$("#form")[0] represents the form object.
FormData() represents the information in the entire form, packaged into an object, if you need to add object properties (get parameters)
formdata.append('gid',data);
3.array_keys() returns an array of key names