function zip_download_yii($path, $data) { $plugin = new plugin(); $rand = uniqid(); $zippath = $path . "../exporter/" . $data['nama_tabel'] . ".zip"; if (file_exists($zippath)) { unlink($zippath); } $plugin->createZipFromDirYii($path, $zippath); header("location:http://" . URL_HOME . "/export.zip"); }