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. Link to comment https://forums.phpfreaks.com/topic/246055-unzip-script/ 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'); } Link to comment https://forums.phpfreaks.com/topic/246055-unzip-script/#findComment-1263696 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.