in reply to how i can running this achive::zip program in CGI?

It depends on how secure and robust you want the program to be. A simple program using eval ;
#!c:/perl/bin/perl -w use strict; use Archive::Zip; use CGI; # run the program eval { my $zipname = 'c:/file.zip'; my $destinationDirectory = 'c:/temp/'; my $zip = Archive::Zip->new($zipname); foreach my $member ($zip->members) { next if $member->isDirectory; (my $extractName = $member->fileName) =~ s{.*/}{}; $member->extractToFileNamed("$destinationDirectory/$extractName"); } }; # result my $msg; if ($@) { $msg = "Error : $@"; } else { $msg = "Zip program ran OK "; } # html page my $q = new CGI; print $q->header( "text/html" ), $q->start_html( -title=>"Zip Program" ), $q->h2( $msg ), $q->end_html;
poj

Replies are listed 'Best First'.
Re: Re: how i can running this achive::zip program in CGI?
by Anonymous Monk on Jan 21, 2003 at 08:48 UTC
    poj,

    I had tried your simple program.
    It can run, but it cannot unzip 'file.zip' to /temp/
    It just tell that Zip Program OK.
    I hope you can tell me how to unzip the 'file.zip'.
    Your kindness I will never forget

    oh..I run Perl on Linux..

    thanx