当前位置: 首页>>代码示例>>PHP>>正文


PHP REST::xml_header方法代码示例

本文整理汇总了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;
    }
开发者ID:CatchPlus,项目名称:CATCHPlus-Handle-Service,代码行数:22,代码来源:portal.php

示例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;
    }
开发者ID:pieterb,项目名称:REST,代码行数:30,代码来源:REST.php

示例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;
    }
开发者ID:CatchPlus,项目名称:CATCHPlus-Handle-Service,代码行数:27,代码来源:global.php


注:本文中的REST::xml_header方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。