PHP Classes

Your class "Unzip"

Recommend this page to a friend!

      Unzip  >  All threads  >  Your class "Unzip"  >  (Un) Subscribe thread alerts  
Subject:Your class "Unzip"
Summary:How is the target directory handled?
Date:2013-01-01 12:29:59
Update:2013-11-12 09:39:47

  1. Your class "Unzip"   Reply   Report abuse  
manfred - 2013-01-01 12:29:59
Thank you for providing this class.
How can I manage it, that the target directory is not created twice.
If I unzip i.e. "" in root directory, than the directory "test" is created. In this directory another directory "test" is created and there all the files are created.

How can I manage just the creation of one directory "test"?

Thank you in advance.

  2. Re: Your class "Unzip"   Reply   Report abuse  
Darren Conyard - 2013-01-09 15:52:26 - In reply to message 1 from manfred
Hi Manfred,

I was looking at this class too and I did not find your problem. You can use this line to create a new directory:

$zip=new UnZIP('');

if you need to create a new directory within the directory your executing the PHP file in then you would need to add this to this line:

$zip=new UnZIP('', 'test');

if you need to create the directory elsewhere then you need to navigate through the tree for example:

$zip=new UnZIP('', '../test');

to create a test directory one level above the current directory. I am not sure if this necessarily solves the problem your having but with this I did not get two directories created with the unzipped files within them.

Best Regards

Darren Conyard

  3. Re: Your class "Unzip"   Reply   Report abuse  
Md. Shahadat Hossain Khan Razon - 2013-11-12 09:39:47 - In reply to message 2 from Darren Conyard
Hello Darren Conyard, Thanks for your support.