本文整理汇总了PHP中REST::xml_header方法的典型用法代码示例。如果您正苦于以下问题:PHP REST::xml_header方法的具体用法?PHP REST::xml_header怎么用?PHP REST::xml_header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类REST
的用法示例。
在下文中一共展示了REST::xml_header方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html_start
public static function html_start($title)
{
$title = REST::htmlspecialchars($title);
$t_index = REST::urlencode(dirname($_SERVER['REQUEST_URI']));
if ($t_index != '/') {
$t_index .= '/';
}
$t_index = REST::htmlspecialchars($t_index);
$portalurl = REST::htmlspecialchars(self::portalURL());
$retval = REST::xml_header() . <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="{$portalurl}style.css" />
<link rel="index" rev="child" type="application/xhtml+xml" href="{$t_index}" />
</head><body>
<div id="header"><p><a rel="index" rev="child" href="{$t_index}"><img border="0" src="{$portalurl}dirup.png"/> UP</a></p>
<h1>{$title}</h1></div>
EOS;
return $retval;
}
示例2: html_start
/**
* @param $title string Title in UTF-8
* @return string a piece of UTF-8 encoded XHTML, including XML and DOCTYPE
* headers.
*/
public static function html_start($title)
{
if (self::$html_start !== null) {
return call_user_func(self::$html_start, $title);
}
$t_title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8');
$t_index = REST::urlencode(dirname($_SERVER['REQUEST_URI']));
if ($t_index != '/') {
$t_index .= '/';
}
$t_stylesheet = self::$STYLESHEET ? self::$STYLESHEET : "{$t_index}style.css";
return REST::xml_header() . <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>{$t_title}</title>
<link rel="stylesheet" type="text/css" href="{$t_stylesheet}" />
<link rel="index" rev="child" type="application/xhtml+xml" href="{$t_index}"/>
</head><body>
<div id="div_header">
<div id="div_index"><a rel="index" rev="child" href="{$t_index}">index</a></div>
<h1 id="h1_title">{$t_title}</h1>
</div>
EOS;
}
示例3: html_start
/**
* @param $title string title in UTF-8
*/
public static function html_start($title)
{
$t_title = htmlspecialchars($title, ENT_COMPAT, "UTF-8");
$t_index = REST::urlencode(dirname($_SERVER['REQUEST_URI']));
if ($t_index != '/') {
$t_index .= '/';
}
$t_stylesheet = self::urlbase() . 'style.css';
$t_icon = self::urlbase() . 'favicon.png';
return REST::xml_header() . <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>{$t_title}</title>
<link rel="stylesheet" type="text/css" href="{$t_stylesheet}" />
<link rel="index" rev="child" type="application/xhtml+xml" href="{$t_index}"/>
<link rel="icon" type="image/png" href="{$t_icon}" />
</head><body>
<div id="div_header">
<div id="div_index"><a rel="index" rev="child" href="{$t_index}">index</a></div>
<h1>{$t_title}</h1>
</div>
EOS;
}