title: Unzip the file using php (collapses the ZIP file into one Folder)
body: <pre><code>    $file_name = 'New Folder.zip'
      $zip = new ZipArchive;
      $result = $zip-&gt;open($target_path.$file_name);
      if ($result === TRUE) {
          for($i = 0; $i &lt; $zip-&gt;numFiles; $i++) {
          $filename = $zip-&gt;getNameIndex($i);
          $fileinfo = pathinfo($filename);
          copy("zip://".$file_name."#".$filename, $target_path.$fileinfo['basename']);
          }
      }
  </code></pre>
  
  <p>When i run this code i get this error <code>Warning: copy(zip://New Folder.zip#New Folder/icon_android.png) [function.copy]: failed to open stream: operation failed in...</code> </p>
  
  <p>How can I solve this...</p>