本文整理汇总了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&cat=' . $this->categories[$this->category]['id'];
$baseUrl .= '&id=' . $this->faq['id'];
$baseUrl .= '&artlang=' . $this->faq['lang'];
}
$url = PMF_Link::getSystemScheme() . $_SERVER['HTTP_HOST'] . $baseUrl;
$urlObj = new PMF_Link($url);
$urlObj->itemTitle = $this->thema;
$_url = str_replace('&', '&', $urlObj->toString());
$this->Cell(0, 10, 'URL: ' . $_url, 0, 1, 'C', 0, $_url);
}
$this->TextColor = $currentTextColor;
}
示例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);
}