Home >Backend Development >PHP Tutorial >PHP能不能把生成的文件打包??

PHP能不能把生成的文件打包??

WBOY
WBOYOriginal
2016-06-23 14:13:49906browse

请问PHP能不能把生成的文件打包(压缩成一个压缩包)??如果可以,怎么实现


回复讨论(解决方案)

可以的 可以看看PHP的扩展 zip

ZipArchive

提供的方法
    [0] => open
    [1] => close
    [2] => getStatusString
    [3] => addEmptyDir
    [4] => addFromString
    [5] => addFile
    [6] => addGlob
    [7] => addPattern
    [8] => renameIndex
    [9] => renameName
    [10] => setArchiveComment
    [11] => getArchiveComment
    [12] => setCommentIndex
    [13] => setCommentName
    [14] => getCommentIndex
    [15] => getCommentName
    [16] => deleteIndex
    [17] => deleteName
    [18] => statName
    [19] => statIndex
    [20] => locateName
    [21] => getNameIndex
    [22] => unchangeArchive
    [23] => unchangeAll
    [24] => unchangeIndex
    [25] => unchangeName
    [26] => extractTo
    [27] => getFromName
    [28] => getFromIndex
    [29] => getStream

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn