[Php 5> = 5.2.0, Php 7, Php 8, Pecl Zip> = 1.1.0]
Ziparchive :: Mở - Mở Lưu trữ tệp ZIP — Open a ZIP file archive
说明
publicZiparchive :: open [chuỗi $filename
, int $flags
= 0]: bool | int ZipArchive::open[string $filename
, int $flags
= 0]: bool|int
Vì Libzip 1.6.0, một tệp trống không còn là một kho lưu trữ hợp lệ nữa.
返回
Trả về true
khi thành công hoặc một trong các mã lỗi sau:true
on success, or one of the following error codes:
ZipArchive::ER_EXISTS
file đã tồn tại .________ Lưu trữ 4zip không nhất quán .________ 5Invalid Đối số .________ 6Malloc FAILED .________ 7NO Tệp như vậy .__ File already exists. ZipArchive::ER_INCONS
Zip archive inconsistent. ZipArchive::ER_INVAL
Invalid argument. ZipArchive::ER_MEMORY
Malloc
failure. ZipArchive::ER_NOENT
No such file. ZipArchive::ER_NOZIP
Not a zip archive. ZipArchive::ER_OPEN
Can't open file. $flags
0 Read error. $flags
1 Seek error.范例
示例 #1 mở và trích xuất
$flags
2
示例 #2 Tạo một kho lưu trữ
$flags
3
示例 #3 Tạo một kho lưu trữ tạm thời
$flags
4
Eric tại WebDeveric Dot Com ¶ ¶
13 năm trước
$flags
5
$flags
6
$flags
7
$flags
8
$flags
9
true
0abolfazl dot ziaratban tại gmail dot com ¶ ¶
7 năm trước
true
1
true
2
true
3OHCC tại 163 dot com ¶ ¶
6 năm trước
true
4
true
5
true
6Jekillen tại Prodigy Net ¶ ¶
7 năm trước
true
7
OHCC tại 163 dot com ¶ ¶
13 năm trước
true
8
true
9
true
0abolfazl dot ziaratban tại gmail dot com ¶ ¶
7 năm trước
ZipArchive::ER_EXISTS
1
ZipArchive::ER_EXISTS
2
ZipArchive::ER_EXISTS
3
ZipArchive::ER_EXISTS
4
true
0OHCC tại 163 dot com ¶ ¶
6 năm trước
ZipArchive::ER_EXISTS
6
ZipArchive::ER_EXISTS
7
ZipArchive::ER_EXISTS
8
ZipArchive::ER_EXISTS
9
ZipArchive::ER_INCONS
0
true
0Jekillen tại Prodigy Net ¶ ¶
JJ tại icglink dot com ¶
ZipArchive::ER_INCONS
2
Fred Johnson ¶ ¶
JJ tại icglink dot com ¶
ZipArchive::ER_INCONS
3
Fred Johnson ¶ ¶
2 năm trước
ZipArchive::ER_INCONS
4
ZipArchive::ER_INCONS
5
true
0Walter tại Clevertechie Dot Com ¶ ¶
9 năm trước
ZipArchive::ER_INCONS
7
ZipArchive::ER_INCONS
8
ZipArchive::ER_INCONS
9OHCC tại 163 dot com ¶ ¶
6 năm trước
ZipArchive::ER_INVAL
0
ZipArchive::ER_INVAL
1
ZipArchive::ER_INVAL
2
ZipArchive::ER_INVAL
3
ZipArchive::ER_INVAL
4
true
0OHCC tại 163 dot com ¶ ¶
6 năm trước
ZipArchive::ER_INVAL
6
Jekillen tại Prodigy Net ¶ ¶
JJ tại icglink dot com ¶
ZipArchive::ER_INVAL
7
ZipArchive::ER_INVAL
8
true
0Fred Johnson ¶ ¶
JJ tại icglink dot com ¶
ZipArchive::ER_MEMORY
0
ZipArchive::ER_MEMORY
1
ZipArchive::ER_MEMORY
2
ZipArchive::ER_MEMORY
3
ZipArchive::ER_MEMORY
4
ZipArchive::ER_MEMORY
5
ZipArchive::ER_MEMORY
6
true
0Fred Johnson ¶ ¶
JJ tại icglink dot com ¶
ZipArchive::ER_MEMORY
8
ZipArchive::ER_MEMORY
9
ZipArchive::ER_NOENT
0
ZipArchive::ER_NOENT
1
ZipArchive::ER_NOENT
2
ZipArchive::ER_NOENT
3
true
0Fred Johnson ¶ ¶
2 năm trước
ZipArchive::ER_NOENT
5
ZipArchive::ER_NOENT
6
true
0Walter tại Clevertechie Dot Com ¶ ¶
13 năm trước
ZipArchive::ER_NOENT
8
ZipArchive::ER_NOENT
9
true
0abolfazl dot ziaratban tại gmail dot com ¶ ¶
13 năm trước
ZipArchive::ER_NOZIP
1
ZipArchive::ER_NOZIP
2
ZipArchive::ER_NOZIP
3
ZipArchive::ER_NOZIP
4
ZipArchive::ER_NOZIP
5
true
0abolfazl dot ziaratban tại gmail dot com ¶ ¶
2 năm trước
ZipArchive::ER_NOZIP
7
ZipArchive::ER_NOZIP
8
ZipArchive::ER_NOZIP
9Walter tại Clevertechie Dot Com ¶ ¶
2 năm trước
ZipArchive::ER_OPEN
0
ZipArchive::ER_OPEN
1
ZipArchive::ER_OPEN
2
ZipArchive::ER_OPEN
3
ZipArchive::ER_OPEN
4
true
0