本文整理匯總了PHP中Header::meta方法的典型用法代碼示例。如果您正苦於以下問題:PHP Header::meta方法的具體用法?PHP Header::meta怎麽用?PHP Header::meta使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Header
的用法示例。
在下文中一共展示了Header::meta方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getHeader
protected function getHeader()
{
$header = new Header();
$header->title = $this->title;
$header->meta("Content-Type", "text/html; charset=utf-8", true);
$header->meta("description", $this->meta_desc, false);
$header->meta("keywords", $this->meta_key, false);
$header->meta("viewport", "width=device-width", false);
$header->favicon = "/favicon.ico";
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0')) {
$header->css = array("/styles/main.css", "/styles/prettify.css", "/styles/unite-gallery.css", "/styles/ie.css");
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari/525.29')) {
$header->css = array("/styles/main.css", "/styles/prettify.css", "/styles/unite-gallery.css", "/styles/safari3.css");
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) {
$header->css = array("/styles/reject.css");
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) {
$header->css = array("/styles/reject.css");
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.5')) {
$header->css = array("/styles/reject.css");
} else {
$header->css = array("/styles/main.css", "/styles/prettify.css", "/styles/unite-gallery.css");
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) {
$header->js = array("/js/reject.min.js");
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) {
$header->js = array("/js/reject.min.js");
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.5')) {
$header->js = array("/js/reject.min.js");
} else {
$header->js = array("/js/jquery-11.0.min.js", "/js/functions.js", "/js/validator.js", "/js/prettify.js", "/js/unitegallery.min.js", "/js/ug-theme-compact.js");
}
return $header;
}
示例2: getHeader
protected function getHeader()
{
$header = new Header();
$header->title = $this->title;
$header->meta("Content-Type", "text/html; charset=utf-8", true);
$header->meta("description", $this->meta_desc, false);
$header->meta("keywords", $this->meta_key, false);
$header->meta("viewport", "width=device-width", false);
$header->favicon = "/favicon.ico";
$header->css = array("/styles/main.css", "/styles/prettify.css");
$header->js = array("/js/jquery-1.10.2.min.js", "/js/functions.js", "/js/validator.js", "/js/prettify.js");
return $header;
}