php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
extract.php
Go to the documentation of this file.
1<?php
2if (!extension_loaded('zip')) {
3 dl('zip.so');
4}
5
7
8echo $zip->filename . "\n";
9$zip->open("test.zip");
10/*
11$zip->addFile("./modules/");
12$zip->addFile("./testempty");
13*/
14echo $zip->status . "\n";
15echo $zip->statusSys . "\n";
16
17echo $zip->numFiles . "\n";
18echo $zip->filename . "\n";
20$files = array('test', 'testdir/test2');
21if (!$zip->extractTo("./testext/path/to", $files)) {
22 echo "error!\n";
23 echo $zip->status . "\n";
24 echo $zip->statusSys . "\n";
25
26}
27
28$zip->close();
var_dump(mixed $value, mixed ... $values)
$zip
Definition create.php:8
dl(string $extension_filename)
Definition dl.stub.php:3
$files
Definition ucgendat.php:59
extension_loaded(string $extension)