Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Extract zip file content with php
SUBMITTED BY:
amsaid
DATE:
Aug. 8, 2016, 3:23 p.m.
FORMAT:
PHP
SIZE:
280 Bytes
Raw
Download
Tweet
HITS:
670
Go to comments
Report
<?php
$zip
=
new
ZipArchive
();
$filename
=
"file_path.zip"
;
if
(
$zip
->
open
(
$filename
)
!==
TRUE
)
{
exit
(
"cannot open <
$filename
>
\n
"
);
}
$zip
->
extractTo
(
'target_folder'
);
echo
"numfiles: "
.
$zip
->
numFiles
.
"
\n
"
;
echo
"status:"
.
$zip
->
status
.
"
\n
"
;
$zip
->
close
();
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus