本文整理匯總了PHP中backupbuddy_core::loopback_test方法的典型用法代碼示例。如果您正苦於以下問題:PHP backupbuddy_core::loopback_test方法的具體用法?PHP backupbuddy_core::loopback_test怎麽用?PHP backupbuddy_core::loopback_test使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::loopback_test方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ini_get
$final_write_speed = pb_backupbuddy::$format->file_size($write_speed_sum / $write_speed_samples) . '/sec';
$final_write_speed_guess = pb_backupbuddy::$format->file_size($write_speed_sum / $write_speed_samples * ini_get('max_execution_time'));
} else {
$final_write_speed = '<i>Unknown</i>';
$final_write_speed_guess = '<i>Unknown</i>';
}
$parent_class_test = array('title' => 'Average Write Speed', 'suggestion' => 'n/a', 'value' => $final_write_speed, 'tip' => __('Average ZIP file creation write speed. Backup file sizes divided by the time taken to create each. Samples: `' . $write_speed_samples . '`.', 'it-l10n-backupbuddy'));
$parent_class_test['status'] = __('OK', 'it-l10n-backupbuddy');
array_push($tests, $parent_class_test);
/***** END AVERAGE WRITE SPEED *****/
// Guess max site size to be able to backup.
$parent_class_test = array('title' => 'Guesstimate of max ZIP size', 'suggestion' => 'n/a', 'value' => $final_write_speed_guess, 'tip' => __('Calculated estimate of the largest .ZIP backup file that may be created. As ZIP files are compressed the site size that may be backed up should be larger than this.', 'it-l10n-backupbuddy'));
$parent_class_test['status'] = __('OK', 'it-l10n-backupbuddy');
array_push($tests, $parent_class_test);
// Http loopbacks.
if (($loopback_response = backupbuddy_core::loopback_test()) === true) {
$loopback_status = 'enabled';
$status = 'OK';
} else {
$loopback_status = 'disabled (enable alternate cron)';
$status = 'WARNING';
}
global $backupbuddy_loopback_details;
$loopback_status .= ' <span title="' . htmlentities($backupbuddy_loopback_details) . '" style="font-style: italic;">Hover for details</span>';
$parent_class_test = array('title' => 'Http Loopbacks', 'suggestion' => 'enabled', 'value' => $loopback_status, 'tip' => __('Some servers do are not configured properly to allow WordPress to connect back to itself via the site URL (ie: http://your.com connects back to itself on the same server at http://your.com/ to trigger a simulated cron step). If this is the case you must either ask your hosting provider to fix this or enable WordPres Alternate Cron mode in your wp-config.php file.', 'it-l10n-backupbuddy'));
$parent_class_test['status'] = __($status, 'it-l10n-backupbuddy');
array_push($tests, $parent_class_test);
// wp-cron.php http loopbacks.
if (($cronback_response = backupbuddy_core::cronback_test()) === true) {
$cronback_status = 'enabled';
$status = 'OK';