Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. if (!is_dir($diretorio)){ echo "Pasta $diretorio nao existe";}
  2.  
  3. else { echo "A Pasta Existe<br>";
  4. $arquivo = isset($_FILES['arquivo']) ? $_FILES['arquivo'] : FALSE;
  5. $nome = 'test';
  6. for ($k = 0; $k < count($arquivo['name']); $k++)
  7. {
  8. $destino = $diretorio."/".$nome.$arquivo['name'][$k];
  9. $imgs = $arquivo['name'];
  10. $array = implode(',', $imgs);
  11. var_dump($array);
  12. $inserir->insert('test', ' img=? ',array($array));
  13.  
  14.  
  15. if (move_uploaded_file($arquivo['tmp_name'][$k], $destino))
  16. {
  17. echo "foi";
  18.  
  19. }
  20.  
  21. else
  22. {
  23. echo "não foi";
  24. }
  25. }
  26.  
  27.  
  28. } // fecha else
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement