示例#1
0
<?php

/**
 * Part of joomla34 project. 
 *
 * @copyright  Copyright (C) 2015 {ORGANIZATION}. All rights reserved.
 * @license    GNU General Public License version 2 or later;
 */
$files = \Ezset\Library\Backup\Backup::fix();
echo '<pre>';
echo implode("<br>", $files);
echo '</pre>';
示例#2
0
<?php

/**
 * Part of joomla341 project. 
 *
 * @copyright  Copyright (C) 2015 {ORGANIZATION}. All rights reserved.
 * @license    GNU General Public License version 2 or later;
 */
use Ezset\Library\System\ResponseHelper;
defined('_JEXEC') or die;
\Ezset\Library\Auth\Authentication::authenticate();
$backupZipFile = new SplFileInfo(\Ezset\Library\Backup\Backup::getBackupZipFile());
ResponseHelper::download($backupZipFile->getPathname(), true, true);
示例#3
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);