本文整理匯總了PHP中Fisharebest\Webtrees\Database::getQueryLog方法的典型用法代碼示例。如果您正苦於以下問題:PHP Database::getQueryLog方法的具體用法?PHP Database::getQueryLog怎麽用?PHP Database::getQueryLog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Fisharebest\Webtrees\Database
的用法示例。
在下文中一共展示了Database::getQueryLog方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pageFooterPopupWindow
/**
* Print the page footer, using the theme
* Note that popup windows are deprecated
*/
public function pageFooterPopupWindow()
{
echo Theme::theme()->footerContainerPopupWindow() . '<!--[if lt IE 9]><script src="' . WT_JQUERY_JS_URL . '"></script><![endif]-->' . '<!--[if gte IE 9]><!--><script src="' . WT_JQUERY2_JS_URL . '"></script><!--<![endif]-->' . '<script src="' . WT_JQUERYUI_JS_URL . '">"</script>' . '<script src="' . WT_WEBTREES_JS_URL . '">"</script>' . $this->getJavascript() . Theme::theme()->hookFooterExtraJavascript() . (WT_DEBUG_SQL ? Database::getQueryLog() : '') . '</body>' . '</html>' . PHP_EOL . '<!-- webtrees: ' . WT_VERSION . ' -->' . '<!-- Execution time: ' . I18N::number(microtime(true) - WT_START_TIME, 3) . ' seconds -->' . '<!-- Memory: ' . I18N::number(memory_get_peak_usage(true) / 1024) . ' KB -->' . '<!-- SQL queries: ' . I18N::number(Database::getQueryCount()) . ' -->';
}
示例2: ajaxRequest
/**
* Handle AJAX requests - to generate the tab content
*/
public function ajaxRequest()
{
// Search engines should not make AJAX requests
if (Auth::isSearchEngine()) {
http_response_code(403);
exit;
}
// Initialise tabs
$tab = Filter::get('module');
// A request for a non-existant tab?
if (array_key_exists($tab, $this->tabs)) {
$mod = $this->tabs[$tab];
} else {
http_response_code(404);
exit;
}
header("Content-Type: text/html; charset=UTF-8");
// AJAX calls do not have the meta tag headers and need this set
header("X-Robots-Tag: noindex,follow");
// AJAX pages should not show up in search results, any links can be followed though
echo $mod->getTabContent();
if (WT_DEBUG_SQL) {
echo Database::getQueryLog();
}
}
示例3: pageFooter
/**
* Print the page footer, using the theme
*/
public function pageFooter()
{
if (WT_DEBUG_SQL) {
echo Database::getQueryLog();
}
echo $this->getJavascript();
}