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


PHP PHPWS_Core::getHttp方法代码示例

本文整理汇总了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);
 }
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:50,代码来源:Layout.php

示例2: getBaseURL

 public static function getBaseURL()
 {
     return PHPWS_Core::getHttp() . $_SERVER['HTTP_HOST'] . preg_replace('/index.*/', '', $_SERVER['PHP_SELF']);
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:4,代码来源:PHPWS_Core.php


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