javascript - NO tmp_name field on $_FILES -


i'm trying upload files asynchronously of them has tmp_name field empty on $_files array on server

i compose form data function

function getcleandata(old){     var newdata = new formdata();     old.foreach(function(item,index){         newdata.append(item['name'],item['value']);     });      filestore.foreach(function(item,index){         newdata.append('desc_files_'+index,item);     });     doc_filestore.foreach(function(item,index){         newdata.append('doc_files_'+index,item);     });      return newdata; }  

this php code

foreach ($_files $key => $value) {         if(strpos($key,"doc_files") !== false){             $newname = $_files[$key]['name'];              $target = './files/'.$newname;             echo $newname;             echo $target;             move_uploaded_file( $_files[$key]['tmp_name'], $target);             $has_files = true;         }     } 

i move files ,and files have $_files['tmp_name'] filed correctly moved ,but there file sthat $_files['tmp_name'] filed emmpty


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -