本文整理汇总了PHP中PHPWS_Core::getHttp方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Core::getHttp方法的具体用法?PHP PHPWS_Core::getHttp怎么用?PHP PHPWS_Core::getHttp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPWS_Core
的用法示例。
在下文中一共展示了PHPWS_Core::getHttp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadHeaderTags
public static function loadHeaderTags(&$template)
{
$page_metatags = null;
$theme = Layout::getCurrentTheme();
$key = Key::getCurrent();
if (Key::checkKey($key, false)) {
$page_metatags = Layout::getMetaPage($key->id);
if (PHPWS_Error::isError($page_metatags)) {
PHPWS_Error::log($page_metatags);
$page_metatags = null;
}
}
if (!isset($_SESSION['javascript_enabled'])) {
$jsHead[] = '<noscript><meta http-equiv="refresh" content="0;url=index.php?nojs=1&ret=' . urlencode(PHPWS_Core::getCurrentUrl()) . '"/></noscript>';
}
if (isset($_GET['nojs'])) {
$_SESSION['javascript_enabled'] = false;
PHPWS_Core::reroute(urldecode($_GET['ret']));
} elseif (!isset($_SESSION['javascript_enabled'])) {
$_SESSION['javascript_enabled'] = true;
}
if (isset($GLOBALS['Layout_JS'])) {
foreach ($GLOBALS['Layout_JS'] as $script => $javascript) {
$jsHead[] = $javascript['head'];
}
}
if (!empty($jsHead)) {
$template['JAVASCRIPT'] = implode("\n", $jsHead);
}
Layout::importStyleSheets();
Layout::submitHeaders($theme, $template);
if (!empty($GLOBALS['Layout_Links'])) {
$template['STYLE'] .= "\n" . implode("\n", $GLOBALS['Layout_Links']);
}
$template['METATAGS'] = Layout::getMetaTags($page_metatags);
if ($page_metatags) {
$template['PAGE_TITLE'] = $page_metatags['page_title'] . PAGE_TITLE_DIVIDER . $_SESSION['Layout_Settings']->getPageTitle(true);
} else {
$template['PAGE_TITLE'] = $_SESSION['Layout_Settings']->getPageTitle();
}
$template['ONLY_TITLE'] = $_SESSION['Layout_Settings']->getPageTitle(TRUE);
// Depricated
// The Site's Name, as set in Layout 'Meta Tags' interface.
$template['SITE_NAME'] = $_SESSION['Layout_Settings']->getPageTitle(TRUE);
$template['BASE'] = Layout::getBase();
$template['HTTP'] = PHPWS_Core::getHttp();
// 'http' or 'https'
// Complete URL of the site's home page
$template['HOME_URL'] = PHPWS_Core::getHomeHttp(true, true, true);
}
示例2: getBaseURL
public static function getBaseURL()
{
return PHPWS_Core::getHttp() . $_SERVER['HTTP_HOST'] . preg_replace('/index.*/', '', $_SERVER['PHP_SELF']);
}