本文整理汇总了PHP中meta_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP meta_tag函数的具体用法?PHP meta_tag怎么用?PHP meta_tag使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了meta_tag函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
header('Content-type: text/html; charset=UTF-8', true);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<?php
echo meta_tag('content-type', 'text/html; charset=utf-8', true);
$favicon_name = 'favicon.ico';
Hook::fire('change_favicon', null, $favicon_name);
echo add_favicon_to_page($favicon_name);
echo link_tag(with_slash(ROOT_URL) . $favicon_name, "rel", "shortcut icon");
?>
</head>
<body>
<script>
var data = <?php
echo $content_for_layout;
?>
;
//alert(<?php
echo json_encode($content_for_layout);
?>
);
parent.og.processResponse(data, <?php
echo json_encode(array('caller' => array_var($_GET, 'current'), 'options' => array()));
?>
);
//alert(<?php
echo json_encode($content_for_layout);
示例2: get_page_title
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php
echo get_page_title();
?>
</title>
<?php
echo stylesheet_tag('dialog.css');
?>
<?php
echo meta_tag('content-type', 'text/html; charset=utf-8', true);
?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php
echo meta_tag('robots', 'noindex, nofollow', false);
?>
<?php
echo link_tag(ROOT_URL . 'favicon.ico', 'rel', 'Shortcut Icon', array("type" => "image/x-icon"));
echo render_page_head();
?>
</head>
<body>
<div id="dialog">
<h1><?php
echo get_page_title();
?>
</h1>
<?php
if (!is_null(flash_get('success'))) {
示例3: render_page_meta
/**
* Return generated page meta code
*
* @access public
* @param void
* @return string
*/
function render_page_meta() {
// Get page instance...
$page = PageDescription::instance();
// Get meta...
$meta = $page->getMeta();
// Generated code...
$generated_code = '';
if (is_array($meta) && count($meta)) {
$generated = array();
foreach ($meta as $data) {
$generated[] = meta_tag($data['name'], $data['content'], $data['http_equiv']);
} // foreach
$generated_code = implode("\n", $generated);
} // if
// Return...
return $generated_code;
} // render_page_meta
示例4: clean
| <?php
if (active_project() instanceof Project) {
echo clean(active_project()->getName());
}
?>
| <?php
echo $site_name;
?>
</title>
<?php
echo meta_tag('content-type', 'text/html; charset=utf-8', true);
?>
<?php
echo meta_tag('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0', true);
?>
<?php
echo render_page_meta();
?>
<?php
echo link_tag(ROOT_URL . 'favicon.ico', 'rel', 'shortcut icon', array("type" => "image/x-icon"));
?>
<?php
echo link_tag(ROOT_URL . 'favicon.ico', 'rel', 'icon', array("type" => "image/x-icon"));
?>
<?php