本文整理汇总了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;
}