当前位置: 首页>>代码示例>>PHP>>正文


PHP DUP_Util::InitSnapshotDirectory方法代码示例

本文整理汇总了PHP中DUP_Util::InitSnapshotDirectory方法的典型用法代码示例。如果您正苦于以下问题:PHP DUP_Util::InitSnapshotDirectory方法的具体用法?PHP DUP_Util::InitSnapshotDirectory怎么用?PHP DUP_Util::InitSnapshotDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DUP_Util的用法示例。


在下文中一共展示了DUP_Util::InitSnapshotDirectory方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: duplicator_package_build

/**
 *  duplicator_package_build
 *  Returns the package result status
 *  
 *  @return json   json object of package results
 */
function duplicator_package_build()
{
    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();
    if (!is_readable(DUPLICATOR_SSDIR_PATH_TMP . "/{$Package->ScanFile}")) {
        die("The scan result file was not found.  Please run the scan step before building the package.");
    }
    $Package->Build();
    //JSON:Debug Response
    //Pass = 1, Warn = 2, Fail = 3
    $json = array();
    $json['Status'] = 1;
    $json['Package'] = $Package;
    $json['Runtime'] = $Package->Runtime;
    $json['ExeSize'] = $Package->ExeSize;
    $json['ZipSize'] = $Package->ZipSize;
    $json_response = json_encode($json);
    error_reporting($errLevel);
    die($json_response);
}
开发者ID:DylanGroenewoud,项目名称:PVNG,代码行数:31,代码来源:actions.php

示例2: duplicator_activate

 function duplicator_activate()
 {
     global $wpdb;
     $table_name = $wpdb->prefix . "duplicator_packages";
     //PRIMARY KEY must have 2 spaces before for dbDelta to work
     $sql = "CREATE TABLE `{$table_name}` (\r\n\t\t\t`id`\t\tBIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT  PRIMARY KEY,\r\n\t\t\t`name`\t\tVARCHAR(250)\tNOT NULL,\r\n\t\t\t`hash`\t\tVARCHAR(50)\t\tNOT NULL,\r\n\t\t\t`status`\tINT(11)\t\t\tNOT NULL,\r\n\t\t\t`created`\tDATETIME\t\tNOT NULL DEFAULT '0000-00-00 00:00:00',\r\n\t\t\t`owner`\t\tVARCHAR(60)\t\tNOT NULL,\r\n\t\t\t`package`\tMEDIUMBLOB\t\tNOT NULL )";
     require_once DUPLICATOR_WPROOTPATH . 'wp-admin/includes/upgrade.php';
     @dbDelta($sql);
     //WordPress Options Hooks
     update_option('duplicator_version_plugin', DUPLICATOR_VERSION);
     //Setup All Directories
     DUP_Util::InitSnapshotDirectory();
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:13,代码来源:duplicator.php

示例3: duplicator_activate

 function duplicator_activate()
 {
     global $wpdb;
     //Only update database on version update
     if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
         $table_name = $wpdb->prefix . "duplicator_packages";
         //PRIMARY KEY must have 2 spaces before for dbDelta to work
         //see: https://codex.wordpress.org/Creating_Tables_with_Plugins
         $sql = "CREATE TABLE `{$table_name}` (\n\t\t\t   id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t   name VARCHAR(250) NOT NULL,\n\t\t\t   hash VARCHAR(50) NOT NULL,\n\t\t\t   status INT(11) NOT NULL,\n\t\t\t   created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t   owner VARCHAR(60) NOT NULL,\n\t\t\t   package MEDIUMBLOB NOT NULL,\n\t\t\t   PRIMARY KEY  (id),\n\t\t\t   KEY hash (hash))";
         require_once DUPLICATOR_WPROOTPATH . 'wp-admin/includes/upgrade.php';
         @dbDelta($sql);
     }
     //WordPress Options Hooks
     update_option('duplicator_version_plugin', DUPLICATOR_VERSION);
     //Setup All Directories
     DUP_Util::InitSnapshotDirectory();
 }
开发者ID:netmagik,项目名称:netmagik,代码行数:17,代码来源:duplicator.php

示例4: duplicator_package_create

function duplicator_package_create()
{
    @set_time_limit(0);
    $errLevel = error_reporting();
    error_reporting(E_ERROR);
    DUP_Util::InitSnapshotDirectory();
    $Task = new DUP_Task();
    $Task->Create();
    //JSON:Debug Response
    //Pass = 1, Warn = 2, Fail = 3
    $json = array();
    $json['Status'] = 1;
    $json['Package'] = $Task->Package;
    $json['Runtime'] = $Task->Package->Runtime;
    $json['ExeSize'] = $Task->Package->ExeSize;
    $json['ZipSize'] = $Task->Package->ZipSize;
    $json_response = json_encode($json);
    error_reporting($errLevel);
    die($json_response);
}
开发者ID:tlandn,项目名称:akvo-web,代码行数:20,代码来源:actions.php

示例5: switch

<?php

require_once DUPLICATOR_PLUGIN_PATH . 'classes/package.php';
global $wpdb;
//POST BACK
$action_updated = null;
if (isset($_POST['action'])) {
    $action_result = DUP_Settings::DeleteWPOption($_POST['action']);
    switch ($_POST['action']) {
        case 'duplicator_package_active':
            $action_response = __('Package settings have been reset.', 'duplicator');
            break;
    }
}
DUP_Util::InitSnapshotDirectory();
$Package = DUP_Package::GetActive();
$package_hash = $Package->MakeHash();
$dup_tests = array();
$dup_tests = DUP_Server::GetRequirements();
$default_name = DUP_Package::GetDefaultName();
$view_state = DUP_UI::GetViewStateArray();
$ui_css_storage = isset($view_state['dup-pack-storage-panel']) && $view_state['dup-pack-storage-panel'] ? 'display:block' : 'display:none';
$ui_css_archive = isset($view_state['dup-pack-archive-panel']) && $view_state['dup-pack-archive-panel'] ? 'display:block' : 'display:none';
$ui_css_installer = isset($view_state['dup-pack-installer-panel']) && $view_state['dup-pack-installer-panel'] ? 'display:block' : 'display:none';
$dup_intaller_files = implode(", ", array_keys(DUP_Server::GetInstallerFiles()));
$dbbuild_mode = DUP_Settings::Get('package_mysqldump') && DUP_Database::GetMySqlDumpPath() ? 'mysqldump' : 'PHP';
?>

<style>
    /* -----------------------------
    REQUIREMENTS*/
开发者ID:creotip,项目名称:trento,代码行数:31,代码来源:new1.base.php


注:本文中的DUP_Util::InitSnapshotDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。