Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. $fotkes = '';
  2. $a = 0;
  3.  
  4. print_r($_FILES);
  5.  
  6. foreach ($_FILES as $key => $value) {
  7.     upload_file($file["name"], $file["tmp_name"]);
  8.     //echo $key . "=>" . print_r($value) . "<br>";
  9. }
  10.  
  11. echo $fotkes;
  12. echo $a;
  13.  
  14. function upload_file($failas, $tmp_name) {
  15.     if ($failas["error"] == 0) {
  16.         $prefix = uniqid();
  17.         $filename = $prefix . "_" . $failas;
  18.         move_uploaded_file($tmp_name, "uploads/" . $filename);
  19.         createthumb("uploads/" . $filename, "uploads/" . "thumb_" . $filename, 800, 800);
  20.         $fotkes .= "thumb_" . $filename . "|";
  21.         $a++;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement