title: How Can I Upload Image Very Fast in PHP...?
body: <p>I want to upload multiple images using PHP. I've already made some code but it's very slow. So would like to make it faster. Any suggestion ?</p>
  
  <p>Here is my code :</p>
  
  <pre><code>foreach($_FILES['files']['tmp_name'] as $key =&gt; $tmp_name )
  { 
      $file_name =$_FILES['files']['name'][$key];
      $file_size =$_FILES['files']['size'][$key];
      $file_tmp =$_FILES['files']['tmp_name'][$key];
      $file_type=$_FILES['files']['type'][$key];  
      if($file_size &gt; 2097152)
      {
          $errors[]='File size must be less than 2 MB';
      }
      $moveResult = move_uploaded_file($file_tmp,"upload/$rand$file_name");   
      if($moveResult) 
      {
          echo "&lt;/br&gt;";
      } 
      else  
      {
          echo "error upload"; 
      }//endd upload   
  }//end for foreach
  </code></pre>