ballhogjoni Posted August 30, 2011 Share Posted August 30, 2011 I need a script that will unzip a file. I can't use ziparchive class because its not installed. ive tried the pclzip.lib.php. I am trying to unzip wordpress-3.2.1.zip using php. Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted August 30, 2011 Author Share Posted August 30, 2011 ok nevermind the problem was me. I was ftping the zip as ascii instead of binary. Once i made this change all worked just fine. final script: <?php require('pclzip.lib.php'); $archive = new PclZip('wordpress-3.2.1.zip'); if ($archive->extract() == 0) { die("Error : ".$archive->errorInfo(true)); } else { unlink('wordpress-3.2.1.zip'); } 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.