Work with ZIP-archives in PHP 5.2+

Starting with PHP 5.2 you can use useful library ZipArchive for easy working with ZIP archives.
(If your PHP version les 5.2 you’ll get error: class ziparchive not found)

Steps for easy working with ZipArchive

$zip = new ZipArchive;

Read ZIP archive:


Create new ZIP archive (just add ZipArchive::CREATE):

$zip->open('{file_location_path}', ZipArchive::CREATE);

Example of extracting archive on your server:

$zip = new ZipArchive;
if ($zip->open('{file_location_path}') === true){
	echo 'Archive file is not found';

Example of creating archive on your server:
Continue reading Work with ZIP-archives in PHP 5.2+

PHPExcel not working with PHP 7.+ – ZipArchive not found

PHPExcel ZipArchive not found

If you catch this error (and you use PHP 7 version) you need:
1. update PHPExcel to 1.8.+
2. try to use this preparing method: