本文整理匯總了PHP中tar::write_tar方法的典型用法代碼示例。如果您正苦於以下問題:PHP tar::write_tar方法的具體用法?PHP tar::write_tar怎麽用?PHP tar::write_tar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tar
的用法示例。
在下文中一共展示了tar::write_tar方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: tar
$l->form_end();
} else {
if ($act == "create") {
if (!$s->cfg['ver']['demo']) {
if (@file_exists($s->cfg['path']['data'] . "/backup.tar")) {
@unlink($s->cfg['path']['data'] . "/backup.tar");
}
require_once $s->cfg['path']['inc'] . "/l_tar.php";
$tar = new tar();
$tar->new_tar($s->cfg['path']['data'], "backup.tar");
$list = array();
foreach ($s->cfg['file'] as $file) {
$list[] = basename($file);
}
$tar->add_files($list, $s->cfg['path']['data']);
$tar->write_tar();
}
$m->location("sec=backup", "Backup criado");
} else {
if ($act == "restore") {
if (!$s->cfg['ver']['demo']) {
require_once $s->cfg['path']['inc'] . "/l_tar.php";
$tar = new tar();
if ($s->req['use'] == "local") {
if (!@file_exists($s->cfg['path']['data'] . "/backup.tar")) {
$m->error_redir("backup_notar");
}
} else {
if (@file_exists($s->cfg['path']['data'] . "/backup.tar")) {
@unlink($s->cfg['path']['data'] . "/backup.tar");
}