tags:

views:

86

answers:

1

If I have a ZIP file whose structure is:

  -directory1 DIR
      -files in here
  -directory2 DIR
      -more files in here

Using pclzip.lib.php how can I open up this ZIP file and extract directory1 (recursive) into a directory and then extract directory2 (recursive) into another directory.

A: 

You should be able to use the PCLZIP_OPT_BY_NAME option to select which path inside the archive you want to extract. PCLZIP_OPT_PATH ought to determine where that branch will be written.

But that's just a guess after browsing the manual -- I've never used this particular library.

timdev