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


PHP PMF_Link::getSystemScheme方法代码示例

本文整理汇总了PHP中PMF_Link::getSystemScheme方法的典型用法代码示例。如果您正苦于以下问题:PHP PMF_Link::getSystemScheme方法的具体用法?PHP PMF_Link::getSystemScheme怎么用?PHP PMF_Link::getSystemScheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMF_Link的用法示例。


在下文中一共展示了PMF_Link::getSystemScheme方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Footer

 /**
  * The footer of the PDF file
  *
  * @return void
  */
 public function Footer()
 {
     global $PMF_LANG;
     $faqconfig = PMF_Configuration::getInstance();
     $currentTextColor = $this->TextColor;
     $this->SetTextColor(0, 0, 0);
     $this->SetY(-25);
     $this->SetFont('dejavusans', '', 10);
     $this->Cell(0, 10, $PMF_LANG['ad_gen_page'] . ' ' . $this->PageNo() . ' / ' . $this->getAliasNbPages(), 0, 0, 'C');
     $this->SetY(-20);
     $this->SetFont('dejavusans', 'B', 8);
     $this->Cell(0, 10, "(c) " . date("Y") . " " . $faqconfig->get('main.metaPublisher') . " <" . $faqconfig->get('main.administrationMail') . ">", 0, 1, "C");
     if ($this->enableBookmarks == false) {
         $this->SetY(-15);
         $this->SetFont('dejavusans', '', 8);
         $baseUrl = '/index.php';
         if (is_array($this->faq) && !empty($this->faq)) {
             $baseUrl .= '?action=artikel&amp;cat=' . $this->categories[$this->category]['id'];
             $baseUrl .= '&amp;id=' . $this->faq['id'];
             $baseUrl .= '&amp;artlang=' . $this->faq['lang'];
         }
         $url = PMF_Link::getSystemScheme() . $_SERVER['HTTP_HOST'] . $baseUrl;
         $urlObj = new PMF_Link($url);
         $urlObj->itemTitle = $this->thema;
         $_url = str_replace('&amp;', '&', $urlObj->toString());
         $this->Cell(0, 10, 'URL: ' . $_url, 0, 1, 'C', 0, $_url);
     }
     $this->TextColor = $currentTextColor;
 }
开发者ID:noon,项目名称:phpMyFAQ,代码行数:34,代码来源:Pdf.php

示例2: getSystemUri

 /**
  * Returns the system URI
  * 
  * @return string
  */
 public static function getSystemUri($path = null)
 {
     // $_SERVER['HTTP_HOST'] is the name of the website or virtual host name (HTTP/1.1)
     // Precisely, it contains what the user has written in the Host request-header, see below.
     // RFC 2616: The Host request-header field specifies the Internet host and port number of the resource
     //           being requested, as obtained from the original URI given by the user or referring resource
     // Remove any ref to standard ports 80 and 443.
     $pattern[0] = '/:80$/';
     // HTTP: port 80
     $pattern[1] = '/:443$/';
     // HTTPS: port 443
     $sysUri = PMF_Link::getSystemScheme() . preg_replace($pattern, '', $_SERVER['HTTP_HOST']);
     return $sysUri . PMF_link::getSystemRelativeUri($path);
 }
开发者ID:jr-ewing,项目名称:phpMyFAQ,代码行数:19,代码来源:Link.php


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