PHP ziparchive 组件
(PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.1.0)
类摘要
class ZipArchive
{
public addEmptyDir(
string $dirname,
int $flags = 0):
bool
public addFile(
string $filepath,
string $entryname = "",
int $start = 0,
int $length = 0,
int $flags = ZipArchive::FL_OVERWRITE):
bool
public addFromString(
string $name,
string $content,
int $flags = ZipArchive::FL_OVERWRITE):
bool
public addGlob(
string $pattern,
int $flags = 0,
array $options = []):
array|false
public addPattern(
string $pattern,
string $path = ".",
array $options = []):
array|false
public getFromIndex(
int $index,
int $len = 0,
int $flags = 0):
string|false
public getFromName(
string $name,
int $len = 0,
int $flags = 0):
string|false
public getNameIndex(
int $index,
int $flags = 0):
string|false
public getStream(
string $name):
resource|false
public getStreamName(
string $name,
int $flags = 0):
resource|false
public locateName(
string $name,
int $flags = 0):
int|false
public open(
string $filename,
int $flags = 0):
bool|int
public renameName(
string $name,
string $new_name):
bool
public replaceFile(
string $filepath,
int $index,
int $start = 0,
int $length = 0,
int $flags = 0):
bool
public setMtimeIndex(
int $index,
int $timestamp,
int $flags = 0):
bool
public setMtimeName(
string $name,
int $timestamp,
int $flags = 0):
bool
public statIndex(
int $index,
int $flags = 0):
array|false
public statName(
string $name,
int $flags = 0):
array|false
}
属性
- status
-
Zip Archive 的状态
- statusSys
-
Zip Archive 的系统状态
- numFiles
-
压缩包里的文件数
- filename
-
在文件系统里的文件名
-
压缩包的注释
目录
Hello!需要输入验证码
微信公众号
哈希空间 数码玩家俱乐部
微信扫码进入公众号回复 1 即可 获得验证码
验证后就可以免弹窗 畅通无阻的访问,一年内有效
关注就是支持,更好的服务提供给粉丝
扫码登录怎么实现?
微信公众号菜单中小程序中也可查看网站内各种资料
方法二:请2个朋友访问你的邀请链接,即可消除弹窗。进度:0/2