title: PHP zip Function issue
body: <p>Hello I am usign the below code to zip a package on upload:</p>
  
  <pre><code>$nameFile = $_FILES['file']['name'];
  $tmpName = $_FILES['file']['tmp_name'];
  $download_folder = './CopyrightFiles/';
  
  $zip = new ZipArchive();
  $fileconpress = $download_folder.$nameFile.".zip";
  
  $conpress = $zip-&gt;open($fileconpress, ZIPARCHIVE::CREATE);
  if ($conpress === true)
  {
  
      $zip-&gt;addFile($tmpName);
      $zip-&gt;close();
      echo $fileconpress."&lt;br/&gt;";
      echo "yess !! Success!!!! ";
  }
  else echo " Oh No! Error";
  </code></pre>
  
  <p>It seems to work ok.</p>
  
  <p>But there are two issues.</p>
  
  <p>First issue it saves the file also with the original extension, something like : <code>image.JPG.zip</code></p>
  
  <p>Also when I then move the zip package to my local computer (Mac) and I open the ZIP inside I can find only a tmp folder with a binary file inside and NOT the image or the file that should be there!</p>
  
  <p>What the hell is going on?</p>
  
  <p>Please advise</p>
  
  <p>Thank you</p>