I have a zip file called myzip.zip
. It contains /myzip/file1.png
and /myzip/subdirectory/file2.png
.
I wish to extract it to /home/me/somedirectory
so I try:
$zip->extractTo('/home/me/somedirectory');
I now have:
/home/me/somedirectory/myzip/file1.png
/home/me/somedirectory/myzip/subdirectory/file2.png
But I wanted:
/home/me/somedirectory/file1.png
/home/me/somedirectory/subdirectory/file2.png
How can this be accomplished?