本文整理汇总了PHP中Phpfox::getBaseUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getBaseUrl方法的具体用法?PHP Phpfox::getBaseUrl怎么用?PHP Phpfox::getBaseUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::getBaseUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHeader
//.........这里部分代码省略.........
}
$aSubCache[$mKey][$mValue] = true;
}
}
}
}
$sCacheData = '';
$sCacheData .= "\n\t\t<script type=\"text/javascript\">\n";
$sCacheData .= $sJs;
$sCacheData .= "\t\t</script>";
if (!empty($sStyleCacheData)) {
$sCacheData .= "\n\t\t" . '<link rel="stylesheet" type="text/css" href="' . Phpfox::getParam('core.url_static') . 'gzip.php?t=css&s=' . $sStylePath . '&f=' . rtrim($sStyleCacheData, ',') . '&v=' . $iVersion . '" />';
}
if (!empty($sJsCacheData)) {
$sCacheData .= "\n\t\t" . '<script type="text/javascript" src="' . Phpfox::getParam('core.url_static') . 'gzip.php?t=js&f=' . rtrim($sJsCacheData, ',') . '&v=' . $iVersion . '"></script>';
}
if (!empty($sCacheData)) {
$sData = preg_replace('/<link rel="shortcut icon" type="image\\/x-icon" href="(.*?)" \\/>/i', '<link rel="shortcut icon" type="image/x-icon" href="\\1" />' . $sCacheData, $sData);
}
if ($bReturnArray) {
$sData = '';
}
$aCacheJs = array_unique($aCacheJs);
$aSubCacheCheck = array();
foreach ($aCacheCSS as $sFile) {
if (defined('PHPFOX_INSTALLER')) {
$sData .= "\t\t" . '<link rel="stylesheet" type="text/css" href="' . $sFile . $sQmark . 'v=' . $iVersion . '" />' . "\n";
} else {
if (isset($aSubCacheCheck[$sFile])) {
continue;
}
$aSubCacheCheck[$sFile] = true;
if (strpos($sFile, 'PF.Site') === false) {
$sData .= "\t\t" . '<link rel="stylesheet" type="text/css" href="' . Phpfox::getBaseUrl() . 'PF.Base/' . $sFile . $sQmark . 'v=' . $iVersion . '" />' . "\n";
} else {
$sData .= "\t\t" . '<link rel="stylesheet" type="text/css" href="' . Phpfox::getBaseUrl() . $sFile . $sQmark . 'v=' . $iVersion . '" />' . "\n";
}
}
}
foreach ($aCacheJs as $sFile) {
if (defined('PHPFOX_INSTALLER')) {
$this->_sFooter .= "\t\t" . '<script type="text/javascript" src="../' . $sFile . $sQmark . 'v=' . $iVersion . '"></script>' . "\n";
} else {
$this->_sFooter .= "\t\t" . '<script type="text/javascript" src="' . Phpfox::getParam('core.path') . $sFile . $sQmark . 'v=' . $iVersion . '"></script>' . "\n";
}
}
if (!defined('PHPFOX_INSTALLER')) {
$this->_sFooter .= "\t\t" . '<script type="text/javascript"> $Core.init(); </script>' . "\n";
}
if (count($this->_aPhrases)) {
$sData .= "\n\t\t<script type=\"text/javascript\">\n\t\t";
foreach ($this->_aPhrases as $sVar => $sPhrase) {
$sPhrase = html_entity_decode($sPhrase, null, 'UTF-8');
$sData .= "\t\t\toTranslations['{$sVar}'] = '" . str_replace("'", "\\'", $sPhrase) . "';\n";
}
$sData .= "\t\t</script>\n";
}
if (!defined('PHPFOX_INSTALLER') && !Phpfox::isAdminPanel()) {
$Request = \Phpfox_Request::instance();
if ($Request->segment(1) == 'theme' && $Request->segment(2) == 'demo') {
$sData .= '<link href="' . Phpfox::getBaseUrl() . 'PF.Site/themes/default/flavor/default.css?v=' . Phpfox::internalVersion() . '" rel="stylesheet">';
} else {
$Theme = $this->_theme->get();
$sData .= '<link href="' . Phpfox::getBaseUrl() . 'PF.Site/themes/' . $Theme->folder . '/flavor/' . $Theme->flavor_folder . '.css?v=' . Phpfox::internalVersion() . '" rel="stylesheet">';
}
}