我正在创建一个PHP服务,用户可以在其中使用PHP将外部ZIP文件从另一台服务器下载到服务器。下载后,我不断收到这个ZIP错误,说明文件已损坏/多部分。事实并非如此。我无法在linux服务器上提取它,但当我将它复制到我的OSX机器上时,当我双击归档文件时,它会完美地提取出来,但终端unzip
命令会给出同样的错误。我很困惑:
Archive: pdbeUpload.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.
这是文件(140MB)的链接:
ftp://ftp.ebi.ac.uk/pub/databases/emdb/structures/EMD-2754/map/emd_2754.map.gz
记住,我的目标是自动化下载过程,所以我需要了解为什么这会失败。
以下是我用枪拉得到的东西:
gunzip pdbeUpload.zip
gzip: pdbeUpload.zip: unknown suffix -- ignored
对于bunzip2
,要完成:
bunzip2: pdbeUpload.zip is not a bzip2 file.
这是一个gzip存档,而不是zip。使用gunzip
。