Home >Backend Development >PHP Tutorial >PHP能不能把生成的文件打包??
请问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