當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。