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


PHP XML_Util::getDocTypeDeclaration方法代码示例

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


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

示例1: htmlspecialchars

print "\n<br><br>\n";
print "building XML declaration with additional attributes:<br>";
print htmlspecialchars(XML_Util::getXMLDeclaration("1.0", "UTF-8", true));
print "\n<br><br>\n";
/**
 * building document type declaration
 */
print "building DocType declaration:<br>\n";
print htmlspecialchars(XML_Util::getDocTypeDeclaration('package', 'http://pear.php.net/dtd/package-1.0'));
print "\n<br><br>\n";
print "building DocType declaration with public ID (does not exist):<br>\n";
print htmlspecialchars(XML_Util::getDocTypeDeclaration('package', array('uri' => 'http://pear.php.net/dtd/package-1.0', 'id' => '-//PHP//PEAR/DTD PACKAGE 0.1')));
print "\n<br><br>\n";
print "building DocType declaration with internal DTD:<br>\n";
print "<pre>";
print htmlspecialchars(XML_Util::getDocTypeDeclaration('package', 'http://pear.php.net/dtd/package-1.0', '<!ELEMENT additionalInfo (#PCDATA)>'));
print "</pre>";
print "\n<br><br>\n";
/**
 * creating an attribute string
 */
$att = array("foo" => "bar", "argh" => "tomato");
print "converting array to string:<br>\n";
print XML_Util::attributesToString($att);
print "\n<br><br>\n";
/**
 * creating an attribute string with linebreaks
 */
$att = array("foo" => "bar", "argh" => "tomato");
print "converting array to string (including line breaks):<br>\n";
print "<pre>";
开发者ID:bantudevelopment,项目名称:polysmis,代码行数:31,代码来源:example.php

示例2: array

echo 'assets url ' . $assets_url;
echo PHP_EOL;
$data = array('foo' => 'bar', 'baz' => 'boom', 'cow' => 'milk', 'php' => 'hypertext processor');
echo http_build_query($data) . "\n";
echo http_build_query($data, '', '&amp;');
echo PHP_EOL;
echo nl2br("Welcome\r\nThis is my HTML document", false);
//lets look at some pear
echo PHP_EOL;
//C:\php\pear\docs\XML_Util\examples\example.php
require_once 'XML/Util.php';
/**
 * building document type declaration
 */
print 'building DocType declaration:<br>';
print htmlspecialchars(XML_Util::getDocTypeDeclaration('package', 'http://pear.php.net/dtd/package-1.0'));
print "\n<br><br>\n";
$modes = mcrypt_list_modes();
echo "mcrypt_list_modes <br>\n";
echo print_r_xml($modes);
//F:\bit5411\php\PEAR\OS\Guess.php  class OS_Guess
require_once 'OS/Guess.php';
$phpwhat = new OS_Guess();
//$phpwhat = OS_Guess::getSignature();  //fatal this
$tmp = $phpwhat->getSignature();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getSysname();
echo $tmp;
echo PHP_EOL;
$tmp = $phpwhat->getNodename();
开发者ID:gmgj,项目名称:gjsoap,代码行数:31,代码来源:gjrsi.php


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