OsvaldoM Posted March 4, 2010 Share Posted March 4, 2010 I've looking for a way to unzip zip files without actually installing the zip module and using my defaults bzip2 or zlib. The documentation in zlib claims it cannot due it by itself... And bzip2, well, it has no documentation pretty much. could someone point me a tutorial or resource that shows how to do it? (in case it's possible). Thanks in advance Quote Link to comment Share on other sites More sharing options...
schilly Posted March 4, 2010 Share Posted March 4, 2010 can't you just use exec() to have the server do it? Never had to do this before but I assume that would work. Quote Link to comment Share on other sites More sharing options...
Psycho Posted March 4, 2010 Share Posted March 4, 2010 If you are using PHP5 and zip support is configured on the server you can use the ZipArchive class. Specifically the extractto method: http://www.php.net/manual/en/function.ziparchive-extractto.php Quote Link to comment Share on other sites More sharing options...
OsvaldoM Posted March 4, 2010 Author Share Posted March 4, 2010 Thanks guys, as it turned out my client just give me the ok to install as many modules as i want so i will be using the zip library. Though, i found out there is a way with Zlib, check this additional library, couldnt get it to work, but i imagine it should... http://www.winimage.com/zLibDll/minizip.html Quote Link to comment Share on other sites More sharing options...
OsvaldoM Posted March 4, 2010 Author Share Posted March 4, 2010 BTW can't you just use exec() to have the server do it? No i couldn't due to server restrictions Quote Link to comment Share on other sites More sharing options...
schilly Posted March 4, 2010 Share Posted March 4, 2010 BTW can't you just use exec() to have the server do it? No i couldn't due to server restrictions ah i see. I saw a ZipArchive example but I hadn't heard of the ZipArchive class before so wasn't sure if it was part of PHP or not. How do you know if it's enabled or not? What is the flag? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.