예제 #1
0
        $ob->out($item->getPathname() . '  =>  ' . $dest . "\n");
        $zip->addFile($item->getPathname(), Backup::encode($dest));
    }
    foreach ($installIterator as $item) {
        if ($item->isDir()) {
            continue;
        }
        $dest = str_replace($installFolder . DIRECTORY_SEPARATOR, '', 'installation' . DIRECTORY_SEPARATOR . $item->getPathname());
        $ob->out($item->getPathname() . '  =>  ' . $dest . "\n");
        $zip->addFile($item->getPathname(), str_replace('\\', '/', $dest));
    }
    $zip->addFile($backupSQLFile->getPathname(), $backupSQLFile->getBasename());
    $zip->deleteName('configuration.dist.php');
    $zip->renameName('configuration.php', 'configuration.dist.php');
    $zip->close();
    echo 'ZIP ok';
} else {
    echo 'failed';
}
?>
</pre>

<script>
	toBottom();
	stop = true;
</script>

<?php 
$ob->endClean();
Backup::redirectToDownload();
// UriHelper::download($backupZipFile->getPathname(), true, true);