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

轻松学算法

轻松学算法

赵烨 / 电子工业出版社 / 2016-7 / 69.00元

《轻松学算法——互联网算法面试宝典》共分为12 个章节,首先介绍了一些基础的数据结构,以及常用的排序算法和查找算法;其次介绍了两个稍微复杂一些的数据结构——树和图,还介绍了每种数据结构和算法的适用场景,之后是一些在工作与面试中的实际应用,以字符串、数组、查找等为例介绍了一些常见的互联网面试题及分析思路,便于读者了解这些思路,顺利地通过互联网公司的面试;最后介绍了一些常见的算法思想,便于读者对今后遇......一起来看看 《轻松学算法》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具