<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">If you're using Drupal 7, it would be
      better to use the built in archiver class. It's used in
      update_manager_archive_extract in
      modules/update/update.manager.inc:<br>
      <br>
<a class="moz-txt-link-freetext" href="https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_archive_extract/7">https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_archive_extract/7</a><br>
      <br>
      <br>
      <pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://hollyit.net">http://hollyit.net</a></pre>
      On 1/27/2014 2:20 AM, Swatee Karpe wrote:<br>
    </div>
    <blockquote
cite="mid:CA+DP+qTC=Fg=N8K7TKj40WbzyhE=bavaeA3TeJ+rwk4SG_=2-w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div>I am using drupal 7 and I want extract the zip file and
          save the extracted folder into files directory. I am taking
          zip file from one of my content type.</div>
        <div><br>
        </div>
        <div>For this I am trying to use ZipArchive class.&nbsp;</div>
        <pre><span style="font-family:arial">&nbsp;$zip = new ZipArchive;</span>
</pre>
        <div>
          <div>&nbsp;$unzip = $zip-&gt;open($filename);</div>
          <div><br>
          </div>
          <div>
            <pre>ZipArchive Object
(
    [status] =&gt; 0
    [statusSys] =&gt; 0
    [numFiles] =&gt; 0
    [filename] =&gt; 
    [comment] =&gt; &nbsp;</pre>
            <div>)</div>
          </div>
          <div><br>
          </div>
          <div>After printing $zip i get the empty array as above.<br>
          </div>
          <div><br>
          </div>
          <div>Do any one know why this is not working in my case?</div>
          <div>Or any one know other way to extract file and save it to
            folder.</div>
          <div><br>
          </div>
          <div>Thanks in advance.</div>
          <div>--</div>
          <div dir="ltr">Swatee Amit Karpe<br>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>