View file sman/set/zip_pack.php
<?php include_once '../../sman/includs/configurations.php'; if (isset($_GET['path'])) { $path = htmlspecialchars($_GET['path']); $zip = new ZipArchive(); if ($zip->open('aaa.zip', ZIPARCHIVE::CREATE) === true) { echo 'yes'; $files = scandir(ROOT.'/'.$path); $zip->AddEmptyDir('dir'); $dirs = substr($path, 0, -mb_strlen($path)-1); foreach ($files as $file) { if ($file != '.' && $file != '..') { $zip->addFile('dir/'.$file); } } $zip->close(); } } ?>