title: Zip an uploaded file not work
body: <p>I try to .rar an uploaded file which not work out well. The only things that is inside the .rar is folder \tmp\phpQWESDA etc etc. 
  My code looks like:</p>
  
  <pre><code>function zipFile($fileName,$folder,$u) {
      $zip = new ZipArchive();
      $zip-&gt;open($folder.'/'.$fileName.".rar", ZipArchive::CREATE);
      $zip-&gt;addFile($u);
      $zip-&gt;close();
      return true;
  }
  
  $tmpFile = $_FILES["file"]["tmp_name"];
  $file = $_FILES["file"]["name"];
  zipFile($file,'uploads/'.$random.'',$tmpFile);
  </code></pre>
  
  <p>EDIT: (SOLVED)</p>
  
  <p>Never mind, forgot to add #2 parameter at 
  <code>$zip-&gt;addFile($u);</code>
   Should be 
  <code>$zip-&gt;addFile($u,$fileName);</code></p>