本文整理汇总了PHP中ossim_db::enable_cache方法的典型用法代码示例。如果您正苦于以下问题:PHP ossim_db::enable_cache方法的具体用法?PHP ossim_db::enable_cache怎么用?PHP ossim_db::enable_cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossim_db
的用法示例。
在下文中一共展示了ossim_db::enable_cache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
Util::memcacheFlush(false);
}
if (is_array($_SESSION['server']) && $_SESSION["server"][0] != '') {
// Change connect variables
$alert_host = $_SESSION['server'][0];
$alert_port = $_SESSION['server'][1];
$alert_user = $_SESSION['server'][2];
$alert_password = $_SESSION['server'][3];
$alert_ext_dbname = $_SESSION['server'][4];
$alert_dbname = preg_match("/\\_restore/", $alert_ext_dbname) ? $alert_ext_dbname : 'alienvault_siem';
$db_connect_method = DB_PCONNECT;
$dbo = new ossim_db();
error_reporting(E_ERROR | E_PARSE);
// Try to connect
try {
$dbo->enable_cache();
$conn_aux = $dbo->custom_connect($alert_port == "" ? $alert_host : $alert_host . ":" . $alert_port, $alert_user, $alert_password);
} catch (Exception $e) {
unset($_SESSION['server']);
$w_html = sprintf(_('Warning! Unable to connect to <strong>%s (%s)</strong>.'), Util::htmlentities($alert_ext_dbname), Util::htmlentities($alert_host));
//$w_html .= ' '._('Connection has been restored to')." <a style='color: #9f6000; font-weight: bold;' href='base_qry_main.php?clear_allcriteria=1&num_result_rows=-1&submit=Query+DB¤t_view=-1&sort_order=time_d'>"._('local')."</a>.";
$w_html .= '<div style="padding: 3px 0px;">' . _('In order to connect to the selected database, go to the <i>External Databases</i> section and follow the instructions provided by the help icon.') . '</div>';
$warning = new Av_warning('<div style="padding: 2px;">' . $w_html . '</div>');
$warning->display();
exit;
}
$dbo->close();
unset($dbo);
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
}
$current_url = Util::get_ossim_url();