php非 7zip存档,Zip - PHP 7 中文文档

本文详细介绍了如何使用PHP的ZipArchive类来创建、修改和管理ZIP文件。包括添加目录、文件、从字符串创建文件,删除条目,解压缩文件,设置和获取文件评论,以及设置和检索外部属性等关键操作。此外,还涵盖了撤销更改和检索文件详情等高级功能。
摘要由CSDN通过智能技术生成

ZipArchive::addEmptyDir — Add a new directory

ZipArchive::addFile — Adds a file to a ZIP archive from the given path

ZipArchive::addFromString — Add a file to a ZIP archive using its contents

ZipArchive::addGlob — Add files from a directory by glob pattern

ZipArchive::addPattern — Add files from a directory by PCRE pattern

ZipArchive::close — Close the active archive (opened or newly created)

ZipArchive::count — Counts the number of files in the achive

ZipArchive::deleteIndex — Delete an entry in the archive using its index

ZipArchive::deleteName — Delete an entry in the archive using its name

ZipArchive::extractTo — 解压缩文件

ZipArchive::getArchiveComment — Returns the Zip archive comment

ZipArchive::getCommentIndex — Returns the comment of an entry using the entry index

ZipArchive::getCommentName — Returns the comment of an entry using the entry name

ZipArchive::getExternalAttributesIndex — Retrieve the external attributes of an entry defined by its index

ZipArchive::getExternalAttributesName — Retrieve the external attributes of an entry defined by its name

ZipArchive::getFromIndex — Returns the entry contents using its index

ZipArchive::getFromName — Returns the entry contents using its name

ZipArchive::getNameIndex — Returns the name of an entry using its index

ZipArchive::getStatusString — Returns the status error message, system and/or zip messages

ZipArchive::getStream — Get a file handler to the entry defined by its name (read only)

ZipArchive::locateName — Returns the index of the entry in the archive

ZipArchive::open — Open a ZIP file archive

ZipArchive::renameIndex — Renames an entry defined by its index

ZipArchive::renameName — Renames an entry defined by its name

ZipArchive::setArchiveComment — Set the comment of a ZIP archive

ZipArchive::setCommentIndex — Set the comment of an entry defined by its index

ZipArchive::setCommentName — Set the comment of an entry defined by its name

ZipArchive::setCompressionIndex — Set the compression method of an entry defined by its index

ZipArchive::setCompressionName — Set the compression method of an entry defined by its name

ZipArchive::setEncryptionIndex — Set the encryption method of an entry defined by its index

ZipArchive::setEncryptionName — Set the encryption method of an entry defined by its name

ZipArchive::setExternalAttributesIndex — Set the external attributes of an entry defined by its index

ZipArchive::setExternalAttributesName — Set the external attributes of an entry defined by its name

ZipArchive::setPassword — Set the password for the active archive

ZipArchive::statIndex — Get the details of an entry defined by its index

ZipArchive::statName — Get the details of an entry defined by its name

ZipArchive::unchangeAll — Undo all changes done in the archive

ZipArchive::unchangeArchive — Revert all global changes done in the archive

ZipArchive::unchangeIndex — Revert all changes done to an entry at the given index

ZipArchive::unchangeName — Revert all changes done to an entry with the given name

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值