本文整理汇总了PHP中backupbuddy_core::read_backward_line方法的典型用法代码示例。如果您正苦于以下问题:PHP backupbuddy_core::read_backward_line方法的具体用法?PHP backupbuddy_core::read_backward_line怎么用?PHP backupbuddy_core::read_backward_line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::read_backward_line方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _test_recent_live_send_fails
private static function _test_recent_live_send_fails()
{
$troubleshooting = true;
// Tell _remote_sends.php to run in troubleshooting/text mode.
require pb_backupbuddy::plugin_path() . '/controllers/pages/server_info/_remote_sends.php';
// Populates $sends.
self::$_results['recent_live_send_fails'] = $sends;
foreach (self::$_results['recent_live_send_fails'] as $key => &$send) {
// Only include Live sends.
if ('live' != $send['type']) {
unset(self::$_results['recent_live_send_fails'][$key]);
continue;
}
// Only include FAILED sends.
if (true !== $send['failed']) {
unset(self::$_results['recent_live_send_fails'][$key]);
continue;
}
// If error message, set as highlight.
if ('' != $send['error']) {
self::$_results['highlights'][] = array('error' => 'File send Error #4389844959:' . $send['error'], 'send_details' => $send);
}
if (file_exists($send['log_file'])) {
$send['log_tail'] = backupbuddy_core::read_backward_line($send['log_file'], self::$_settings['send_fail_status_log_recent_lines']);
} else {
self::$_results['extraneous_log_tail'] = '**Log file `' . $send['log_file'] . '` not found.**';
}
}
if (count(self::$_results['recent_live_send_fails']) > 0) {
self::$_results['highlights'][] = count(self::$_results['recent_live_send_fails']) . ' total files pending send before Snapshot can be made.';
}
}