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

Facebook效应

Facebook效应

[美] 大卫·柯克帕特里克 / 沈路、梁军、崔筝 / 华文出版社 / 2010-10 / 49.80

本书作者近距离地采访了与Facebook相关的人士,其中包括Facebook的创始人、员工、投资人、意向投资人以及合作伙伴,加起来超过了130人。这是真切详实的访谈,更是超级精彩的故事。作者以其细腻的笔触,精巧的叙事结构,解密了Facebook如何从哈佛的宿舍里萌发,创始人的内讧,权力之争,如何放弃华盛顿邮报的投资,怎样争取到第一个广告客户,而第一轮融资又如何获得一亿美元的估值,让人痴迷的图片产品......一起来看看 《Facebook效应》 这本书的介绍吧!

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

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

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

HSV CMYK互换工具