PHP DOM Template

码农软件 · 软件分类 · 模板引擎 · 2019-08-25 14:29:11

软件介绍

PHP DOM Template 是一个快速的 PHP 模板引擎,下面是一个 Hello World 的例子:

<?php
// Start the output buffer
ob_start();
?>
<!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">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>PHP Dom Template (PDT) Library - example01.html</title>
  <link rel="stylesheet" type="text/css" href="../css/stylesheet.css" />
</head>
<body>
  <p><a href="../example01.php">Back To Example 1</a></p>
  <div id="content">
    <h1>Hello World</h1>
    <p var="helloWorld">Default Text</p>
    <p>&#160;</p>
    <p class="copyright"><a href="http://www.domtemplate.com">Copyright 2008 PHP DOM Template</a></p>
  </div>
  <p><a href="../example01.php">Back To Example 1</a></p>
</body>
</html>
<?php
// include the Template lib
include_once dirname(__FILE__) . '/../Template.php';
// Create a template from the html in the buffer
$buff ob_get_clean();
$template Dk_Dom_Template::loadXml($buff);
$template->replaceText('helloWorld''This is the `Hello World` Dynamic text.');
echo 
$template->getDocument()->saveXML();
?>

本文地址:https://codercto.com/soft/d/13142.html

Scratch少儿趣味编程

Scratch少儿趣味编程

[ 日] 阿部和广 / 陶 旭 / 人民邮电出版社 / 2014-11 / 59.00元

Scratch 是麻省理工学院设计开发的一款编程工具,是适合少儿学习编程和交流的工具和平台,有中文版且完全免费。本书结合孩子们学习的语文、数学、科学、社会、音乐、体育等科目,手把手地教大家如何用Scratch 设计程序(如设计一个自动写作文的程序),配合各式卡通形象,通俗易懂,寓教于乐。麻省理工学院教授米切尔•瑞斯尼克作序推荐。 本书图文并茂,生动风趣,适合中小学生等初学者自学或在家长的帮助......一起来看看 《Scratch少儿趣味编程》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具