本文整理汇总了PHP中DUP_Package::TmpCleanup方法的典型用法代码示例。如果您正苦于以下问题:PHP DUP_Package::TmpCleanup方法的具体用法?PHP DUP_Package::TmpCleanup怎么用?PHP DUP_Package::TmpCleanup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DUP_Package
的用法示例。
在下文中一共展示了DUP_Package::TmpCleanup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: duplicator_package_scan
/**
* DUPLICATOR_PACKAGE_SCAN
* Returns a json scan report object which contains data about the system
*
* @return json json report object
* @example to test: /wp-admin/admin-ajax.php?action=duplicator_package_scan
*/
function duplicator_package_scan()
{
@set_time_limit(0);
$errLevel = error_reporting();
error_reporting(E_ERROR);
DUP_Util::InitSnapshotDirectory();
$Package = DUP_Package::GetActive();
$report = $Package->Scan();
$Package->SaveActiveItem('ScanFile', $Package->ScanFile);
$json_response = json_encode($report);
DUP_Package::TmpCleanup();
error_reporting($errLevel);
die($json_response);
}
示例2: duplicator_package_scan
/**
* DUPLICATOR_PACKAGE_SCAN
* Returns a json scan report object which contains data about the system
*
* @return json json report object
* @example to test: /wp-admin/admin-ajax.php?action=duplicator_package_scan
*/
function duplicator_package_scan()
{
header('Content-Type: application/json;');
DUP_Util::CheckPermissions('export');
@set_time_limit(0);
$errLevel = error_reporting();
error_reporting(E_ERROR);
DUP_Util::InitSnapshotDirectory();
$Package = DUP_Package::GetActive();
$report = $Package->Scan();
$Package->SaveActiveItem('ScanFile', $Package->ScanFile);
$json_response = json_encode($report);
DUP_Package::TmpCleanup();
error_reporting($errLevel);
die($json_response);
}
示例3: switch
}
}
$txt_found = DUP_Util::__("File Found");
$txt_not_found = DUP_Util::__("File Removed");
$installer_files = DUP_Server::GetInstallerFiles();
switch ($_GET['action']) {
case 'installer':
$action_response = __('Installer file cleanup ran!');
$css_hide_msg = 'div.error {display:none}';
break;
case 'legacy':
DUP_Settings::LegacyClean();
$action_response = __('Legacy data removed.');
break;
case 'tmp-cache':
DUP_Package::TmpCleanup(true);
$action_response = __('Build cache removed.');
break;
}
?>
<style type="text/css">
<?php
echo isset($css_hide_msg) ? $css_hide_msg : '';
?>
div.success {color:#4A8254}
div.failed {color:red}
table.dup-reset-opts td:first-child {font-weight: bold}
table.dup-reset-opts td {padding:10px}
form#dup-settings-form {padding: 0px 10px 0px 10px}
a.dup-fixed-btn {min-width: 150px; text-align: center}