本文整理汇总了PHP中Assets::getServeLinkTag方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::getServeLinkTag方法的具体用法?PHP Assets::getServeLinkTag怎么用?PHP Assets::getServeLinkTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assets
的用法示例。
在下文中一共展示了Assets::getServeLinkTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
<html>
<head>
<?php
/**
* Load CSS Only
*/
echo Assets::getServeLinkTag();
?>
<title><?php
echo $title;
?>
- Lobby</title>
</head>
<body>
<div id="workspace">
<div class="contents">
<h1><?php
echo $title;
?>
</h1>
<p><?php
echo $description;
?>
</p>
<p>
<a href="#" onclick="window.history.go(-1)">Return to previous page</a>
</p>
<p>
© <a target='_blank' href='//lobby.subinsb.com'>Lobby</a> 2014 - <?php
echo date("Y");
?>
示例2: head
/**
* Print the <head> tag
*/
public static function head($title = "")
{
header('Content-type: text/html; charset=utf-8');
if ($title != "") {
self::setTitle($title);
}
if (Assets::issetJS('jquery')) {
/**
* Load jQuery, jQuery UI, Lobby Main, App separately without async
*/
$url = L_URL . "/includes/serve-assets.php?type=js&assets=" . implode(",", array(Assets::getJS('jquery'), Assets::getJS('jqueryui'), Assets::getJS('main'), Assets::issetJS('app') ? Assets::getJS('app') : ""));
echo "<script src='{$url}'></script>";
Assets::removeJS("jquery");
Assets::removeJS("jqueryui");
Assets::removeJS("main");
}
$jsURLParams = array("THEME_URL" => Themes::getThemeURL());
if (Apps::isAppRunning()) {
$jsURLParams["APP_URL"] = urlencode(Apps::getInfo("url"));
$jsURLParams["APP_SRC"] = urlencode(Apps::getInfo("srcURL"));
}
$jsURL = Assets::getServeURL("js", $jsURLParams);
echo "<script>lobby.load_script_url = '" . $jsURL . "';</script>";
$cssServeParams = array("THEME_URL" => THEME_URL);
/**
* CSS Files
*/
if (Apps::isAppRunning()) {
$cssServeParams["APP_URL"] = urlencode(Apps::getInfo("url"));
$cssServeParams["APP_SRC"] = urlencode(Apps::getInfo("srcURL"));
}
echo Assets::getServeLinkTag($cssServeParams);
echo "<link href='" . L_URL . "/favicon.ico' sizes='16x16 32x32 64x64' rel='shortcut icon' />";
/* Title */
echo "<title>" . self::$title . "</title>";
}