Hi, I'm looking for a solution of the following problem: I have a .php file to upload a .zip file into a folder(e.g, myzips,), then to unzip the file in that folder. I can create the folder 'myzips' and upload the .zip file. But the problem is to unzip/extract the file there. Is there anybody who can help me in solving the problem? Green rep will obviously be provided
If you have cpanel hosting , you can do it via the file manager in cpanel. If you click once on the file.zip , top right you'll receive an extract option. Works for me...
Thanks for your suggestion. But I want a process(solution in php) to do that. I'm developing a site where user can create a folder(e.g, myfolder), then upload a .zip file there and press submit. Then the uploaded .zip file will be uncompressed in the 'myfolder'. Can you help me about that? please try
If there's zip available on your server, you can run it as an external command: exec("unzip zipfile.zip"); PHP:
I dont understand either of these solutions, does anybody else have any ideas? I need to upload either an entire directory of files or a zip and then unzip it to a server directory, I cant seem to find a solution short of a content management type deal, thoughts?
You cannot execute a zip file. Hower you can unzip it with a tool called.... unzip An yes, you need server permission to use it. And it has to be on your server of course.
whats so hard to understand, download the php class from the link I provided and use it! I mean it's so well documented it takes about 10 seconds to get it running.
take a look at this http://us3.php.net/manual/en/ref.zip.php and make sure the place you want to extract the file have permission to write by the webserver.