Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Create a zip file with PHP
SUBMITTED BY:
amsaid
DATE:
Aug. 8, 2016, 3:30 p.m.
FORMAT:
PHP
SIZE:
219 Bytes
Raw
Download
Tweet
HITS:
645
Go to comments
Report
<?php
$zip
=
new
ZipArchive
();
$zip
->
open
(
'path/to/zipfile.zip'
,
ZipArchive
::
CREATE
);
$zip
->
addFile
(
'some-file.pdf'
,
'subdir/filename.pdf'
);
$zip
->
addFile
(
'another-file.xlxs'
,
'filename.xlxs'
);
$zip
->
close
();
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus