- 论坛徽章:
- 0
|
各位大侠,我的程序如下:
my $FilePath = "" . $doc->getElementsByLocalName('reportFilePath');
open( AB, ">/home/test/API/$time.zip" )
|| die("cant open it");
my $url = get("$FilePath");
$url =~ s/&/\&/g;
print AB $url;
后得到一个压缩包2012-02-27.zip。
我用unzip
my $costzip="/home/test/API/2012-02-27\.zip";
my $tempdir ="/home/test/API/";
my $re =system("unzip -o $costzip -d $tempdir");
但是最后执行结果却是:
Archive: /home/test/API/2012-02-27.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of/home/test/API/2012-02-27.zip or
/home/test/API/2012-02-27.zip.zip, and cannot find /home/test/API/2012-02-27.zip.ZIP, period
还请大侠们赐教 |
|