Estoy enviando una serie de imágenes y algo de texto de la función javascript ajax al archivo php y puedo leer los parámetros de texto, pero no puedo leer los parámetros del archivo de imagen en el código php, ¿cómo puedo hacer eso? código Javascript '''
formdata.append("file",img[i]); xhttp.send("itemname="+itemname+"&category="+category+"&color="+color+"&price="+price +"&image="+formdata+"&brandname="+brandname+"&attributes="+attributes+"&smalldescp="+smalldesp +"&longdescp="+largedescp+"&warentyyear="+warentyyr+"&warentydescp="+warentypolicydescp+"&length="+pkglen +"&width="+pkgweight+"&height="+pkgheg);'''Codigo PHP '''
$itemname = $_POST["itemname"]; $category = $_POST["category"]; $color = $_POST["color"]; $price = $_POST["price"]; $image =$_POST["image"]; $brandname = $_POST["brandname"]; $attributes = $_POST["attributes"]; $smalldescp = $_POST["smalldescp"]; $longdescp = $_POST["longdescp"]; $warentyyear = $_POST["warentyyear"]; $warentydescp = $_POST["warentydescp"]; $length = $_POST["length"]; $width = $_POST["width"]; $height = $_POST["height"]; echo json_encode($image->$_FILES['file']['name'][0]);'''