There is a code:




     // Create a folder
             mkdir ($ id ['id']. '/', 0777);

             // We throw files
             $ folder = $ id ['id']. '/';



 $ file = $ _FILES ['mfa'] ['tmp_name'];
 move_uploaded_file ($ file, $ folder. $ mfa);

 $ file = $ _FILES ['title'] ['tmp_name'];
 move_uploaded_file ($ file, $ folder. $ title);

 $ file = $ _FILES ['s1'] ['tmp_name'];
 move_uploaded_file ($ file, $ folder. $ _ FILES ['s1'] ['name']);

 $ file = $ _FILES ['s2'] ['tmp_name'];
 move_uploaded_file ($ file, $ folder. $ _ FILES ['s2'] ['name']);

 $ file = $ _FILES ['s3'] ['tmp_name'];
 move_uploaded_file ($ file, $ folder. $ _ FILES ['s3'] ['name']);




So, the problem is that it does not move all the files, but randomly 2-3 files, each time different, I can not understand what the problem is, help.

  • If what do not be errors? - Farkhod Daniyarov
  • It does not give any errors - Fair Man
  • Look at the documentation php.net/manual/ru/function.move-uploaded-file.php and implement your code on it, you need to know what the function returns - Farkhod Daniyarov
  • $folder.$_FILES['s3']['name'] need to be run through basename, it's not safe to do so, $folder.$mfa that for $mfa it may not be detected - Farkhod Daniyarov
  • $mfa and $title defined calmly, they always move, usually a problem with the others. - Fair Man

0