...

View Full Version : win zip command line in php



romram
04-27-2004, 10:53 AM
I used the following code to unzip files using winzip command line, the command worked in the command window, but it didn't work in the code, it says that the file is unzipped but I can't see any thing...?




<?PHP
$root ='c:\\';
$unzipcmd = 'c:\>"c:\\program files\\winzip\\wzunzip" -d';

function unzip($source,$target) {
global $unzipcmd;
if (file_exists($source)) {
echo "unzipping $source to $target . . .<br>";
$cmd = $unzipcmd.' '.$source.' '.$target;
echo $cmd."<br>";
system($cmd,$return);
echo 'done. <BR>';
}
else return "File $source Not Found!<br>";
}

echo "<pre>".unzip($root."MyFile.zip","c:\\")."</pre>";
echo $root."<BR>";
?>

WA
04-27-2004, 11:01 AM
Hi:
Please do not start a new thread when following up on an earlier question. You've already posted an identical response here: http://www.codingforums.com/showthread.php?t=37111

Closing this thread.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum