Jump to content

Zip-ExtractTo Help Please.


Cnielsen4211

Recommended Posts

More dramas...

 

I have this code :

 

$dir = $zipdir.'/unpack'; // which is a valid directory

 

chmod($dir,0775);

$zip = new ZipArchive;

if ($zip->open($zipdir.'/'.$zipname) === TRUE) {

    $zip->extractTo($dir);

    $zip->close();

 

And it sort of works... I get the unpacked files placed  in $dir no problems..  But it produces this error.

 

Warning: ZipArchive::extractTo(tempdir/unpack/..) [ziparchive.extractto]: failed to open stream: Is a directory

 

????

 

It did open the directory and it did extract the files, so why is it giving me this error message?

 

Anyone ???  :confused:

 

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/216945-zip-extractto-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.