當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DupUtil::readable_bytesize方法代碼示例

本文整理匯總了PHP中DupUtil::readable_bytesize方法的典型用法代碼示例。如果您正苦於以下問題:PHP DupUtil::readable_bytesize方法的具體用法?PHP DupUtil::readable_bytesize怎麽用?PHP DupUtil::readable_bytesize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DupUtil的用法示例。


在下文中一共展示了DupUtil::readable_bytesize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: var_export

DUPX_Log::Info("LOG FILE 644:\t" . var_export($GLOBALS['CHOWN_LOG_PATH'], true));
DUPX_Log::Info("BUILD NAME:\t{$GLOBALS['FW_SECURE_NAME']}");
DUPX_Log::Info("REQUEST URL:\t{$GLOBALS['URL_PATH']}");
$log = "--------------------------------------\n";
$log .= "POST DATA\n";
$log .= "--------------------------------------\n";
$log .= print_r($POST_LOG, true);
DUPX_Log::Info($log, 2);
//====================================================================================================
//UNZIP & FILE SETUP - Extract the zip file and prep files
//====================================================================================================
$log = "\n********************************************************************************\n";
$log .= "ARCHIVE SETUP\n";
$log .= "********************************************************************************\n";
$log .= "NAME:\t{$_POST['package_name']}\n";
$log .= "SIZE:\t" . DupUtil::readable_bytesize(@filesize($_POST['package_name'])) . "\n";
$log .= "ZIP:\t{$zip_support} (ZipArchive Support)";
DUPX_Log::Info($log);
$zip_start = DupUtil::get_microtime();
if ($_POST['zip_manual']) {
    DUPX_Log::Info("\n** PACKAGE EXTRACTION IS IN MANUAL MODE ** \n");
} else {
    if ($GLOBALS['FW_PACKAGE_NAME'] != $_POST['package_name']) {
        $log = "\n--------------------------------------\n";
        $log .= "WARNING: This package set may be incompatible!  \nBelow is a summary of the package this installer was built with and the package used. \n";
        $log .= "To guarantee accuracy the installer and archive should match. For details see the online FAQs.";
        $log .= "\nCREATED WITH:\t{$GLOBALS['FW_PACKAGE_NAME']} \nPROCESSED WITH:\t{$_POST['package_name']}  \n";
        $log .= "--------------------------------------\n";
        DUPX_Log::Info($log);
    }
    if (!class_exists('ZipArchive')) {
開發者ID:DIESELOK,項目名稱:GH-Frontend-5,代碼行數:31,代碼來源:ajax.step1.php

示例2: var_export

 DupUtil::log("DOC ROOT 755:\t" . var_export($GLOBALS['CHOWN_ROOT_PATH'], true));
 DupUtil::log("LOG FILE 644:\t" . var_export($GLOBALS['CHOWN_LOG_PATH'], true));
 DupUtil::log("BUILD NAME:\t{$GLOBALS['FW_SECURE_NAME']}");
 DupUtil::log("REQUEST URL:\t{$GLOBALS['URL_PATH']}");
 DupUtil::log("--------------------------------------");
 DupUtil::log("POST DATA");
 DupUtil::log("--------------------------------------");
 DupUtil::log(print_r($POST_LOG, true));
 //====================================================================================================
 //UNZIP & FILE SETUP - Extract the zip file and prep files
 //====================================================================================================
 DupUtil::log("{$GLOBALS['SEPERATOR1']}");
 DupUtil::log('UNZIP & FILE SETUP');
 DupUtil::log("{$GLOBALS['SEPERATOR1']}");
 DupUtil::log("PACKAGE:\t" . $_POST['package_name']);
 DupUtil::log("SIZE:\t\t" . DupUtil::readable_bytesize(@filesize($_POST['package_name'])));
 $zip_start = DupUtil::get_microtime();
 if ($_POST['zip_manual']) {
     DupUtil::log("\n-package extraction is in manual mode-\n");
 } else {
     if ($GLOBALS['FW_PACKAGE_NAME'] != $_POST['package_name']) {
         DupUtil::log("WARNING: This Package Set may be incompatible!  \nBelow is a summary of the package this installer was built with and the package used. To guarantee accuracy make sure the installer and package match. For more details see the online FAQs.  \ncreated with:   {$GLOBALS['FW_PACKAGE_NAME']}  \nprocessed with: {$_POST['package_name']}  \n");
     }
     $target = $root_path;
     $zip = new ZipArchive();
     if ($zip->open($_POST['package_name']) === TRUE) {
         $zip->extractTo($target);
         DupUtil::log("INFORMATION:\t" . print_r($zip, true));
         $close_response = $zip->close();
         DupUtil::log("ZIP CLOSE: " . var_export($close_response, true));
     } else {
開發者ID:batruji,項目名稱:metareading,代碼行數:31,代碼來源:installer.template.php


注:本文中的DupUtil::readable_bytesize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。