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


PHP backupbuddy_core::loopback_test方法代码示例

本文整理汇总了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';
开发者ID:elephantcode,项目名称:elephantcode,代码行数:31,代码来源:server.php


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