View Full Version : win zip command line in php

04-27-2004, 09: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...?

$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>";
echo 'done. <BR>';
else return "File $source Not Found!<br>";

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

04-27-2004, 10:01 AM
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