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


PHP HTMLPage::addElementToHead方法代码示例

本文整理汇总了PHP中HTMLPage::addElementToHead方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLPage::addElementToHead方法的具体用法?PHP HTMLPage::addElementToHead怎么用?PHP HTMLPage::addElementToHead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTMLPage的用法示例。


在下文中一共展示了HTMLPage::addElementToHead方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(SYMPHONY_URL . '/assets/basic.css', 'screen', 30);
$Page->addStylesheetToHead(SYMPHONY_URL . '/assets/error.css', 'screen', 30);
$Page->addHeaderToPage('HTTP/1.0 500 Server Error');
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'xslt');
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('XSLT Processing Error'))));
$div = new XMLElement('div', NULL, array('id' => 'description'));
$div->appendChild(new XMLElement('h1', __('XSLT Processing Error')));
$div->appendChild(new XMLElement('p', __('This page could not be rendered due to the following XSLT processing errors.')));
$Page->Body->appendChild($div);
$ul = new XMLElement('ul', NULL, array('id' => 'details'));
$errors_grouped = array();
list($key, $val) = $e->getAdditional()->proc->getError(false, true);
do {
    if (preg_match('/^loadXML\\(\\)/i', $val['message']) && preg_match_all('/line:\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['xml'][] = array('line' => $matches[1][0], 'raw' => $val);
    } elseif (preg_match_all('/pages\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['page'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } elseif (preg_match_all('/utilities\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['utility'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } else {
        $errors_grouped['general'][] = $val;
    }
开发者ID:benesch,项目名称:hilton-unar,代码行数:31,代码来源:tpl.xslt-error.php

示例2: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addElementToHead(new XMLElement('link', NULL, array('rel' => 'icon', 'href' => URL . '/symphony/assets/images/bookmark.png', 'type' => 'image/png')), 20);
$Page->addStylesheetToHead(URL . '/symphony/assets/error.css', 'screen', 30);
$Page->addElementToHead(new XMLElement('!--[if IE]><link rel="stylesheet" href="' . URL . '/symphony/assets/legacy.css" type="text/css"><![endif]--'), 40);
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'generic');
if (isset($additional['header'])) {
    $Page->addHeaderToPage($additional['header']);
}
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), $heading)));
$div = new XMLElement('div', NULL, array('id' => 'description'));
$div->appendChild(new XMLElement('h1', $heading));
$div->appendChild(is_object($errstr) ? $errstr : new XMLElement('p', trim($errstr)));
$Page->Body->appendChild($div);
print $Page->generate();
exit;
开发者ID:bauhouse,项目名称:sym-fluid960gs,代码行数:23,代码来源:tpl.error.php

示例3: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addElementToHead(new XMLElement('link', NULL, array('rel' => 'icon', 'href' => URL . '/symphony/assets/images/bookmark.png', 'type' => 'image/png')), 20);
$Page->addStylesheetToHead(URL . '/symphony/assets/error.css', 'screen', 30);
$Page->addHeaderToPage('HTTP/1.0 500 Server Error');
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'generic');
if (isset($additional['header'])) {
    $Page->addHeaderToPage($additional['header']);
}
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), $heading)));
$div = new XMLElement('div', NULL, array('id' => 'description'));
$div->appendChild(new XMLElement('h1', $heading));
$div->appendChild(is_object($errstr) ? $errstr : new XMLElement('p', trim($errstr)));
$Page->Body->appendChild($div);
print $Page->generate();
exit;
开发者ID:bauhouse,项目名称:sym-fluidgrids,代码行数:23,代码来源:tpl.error.php


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