本文整理汇总了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')) {
示例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 {