Pain.php 復制代碼 代碼如下: <?php class Pain { public $var=array(); public $tpl=array(); //this is the method to assign vars to the template public function assign($variable,$value=null) { $ " /> 男男腐文污高干嗯啊快点1V1,91素人约啪,国产精品无码视频一区二区

天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

Pain 全世界最小最簡單的PHP模板引擎 (普通版)

打包下載

Pain.php
復制代碼 代碼如下:
<?php
class Pain
{
public $var=array();
public $tpl=array();
//this is the method to assign vars to the template
public function assign($variable,$value=null)
{
$this->var[$variable]=$value;
}
public function display($template_name,$return_string=false)
{
//first find whether the tmp file in tmp dir exists.
if(file_exists("tmp/temp_file.php"))
{
unlink("tmp/temp_file.php");
}
extract($this->var);
$tpl_content=file_get_contents($template_name);
$tpl_content=str_replace("{@", "<?php echo ", $tpl_content);
$tpl_content=str_replace("@}", " ?>", $tpl_content);
//create a file in the /tmp dir and put the $tpl_contentn into it, then
//use 'include' method to load it!
$tmp_file_name="temp_file.php";
//$tmp is the handler
$tmp=fopen("tmp/".$tmp_file_name, "w");
fwrite($tmp, $tpl_content);
include "tmp/".$tmp_file_name;
}
}
?>

test.php
復制代碼 代碼如下:
<?php
require_once "Pain.php";
$pain=new Pain();
$songyu="songyu nb";
$zhangyuan="zhangyuan sb";
$pain->assign("songyu",$songyu);
$pain->assign("zhangyuan",$zhangyuan);
$pain->display("new_file.html");
?>

new_file.html
復制代碼 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>new_file</title>
</head>
<body>
{@$songyu@}<br/>
{@$zhangyuan@}
</body>
</html>

php技術Pain 全世界最小最簡單的PHP模板引擎 (普通版),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 毛篇片在线观看 | 制服丝袜 快播 | 2018年免费三级av观看 | 大香伊人中文字幕精品 | 成年人深夜福利 | 国产一区二区内射最近更新 | 性春院| 97超碰在线视频人人av | 2017天天拍天天拍香蕉视频 | 国产亚洲美女在线视频视频 | 国产亚洲精品久久久久久国模美 | 国产爱豆剧果冻传媒在线 | 美艳人妻在厨房翘着屁股 | jlzzzjizzzjlzzz亚洲| 国产精品第1页在线观看 | 欧美黄色第一页 | 一个人在线观看免费高清视频 | 日日噜噜大屁股熟妇 | 亚洲综合免费视频 | 色婷婷国产精品视频一区二区三区 | 天天射天天爱天天干 | 97精品一区二区视频在线观看 | 含羞草国产亚洲精品岁国产精品 | 久久中文字幕人妻熟AV女蜜柚M | 亚洲视频不卡 | 精品欧美18videosex欧美 | 午夜精品久久久内射近拍高清 | 影音先锋色av男人资源网 | 草莓视频在线看免费高清观看 | 富婆大保健嗷嗷叫普通话对白 | 国产精品爆乳尤物99精品 | 啦啦啦 中国 日本 高清 在线 | 日韩欧美一区二区三区在线 | 青柠在线观看视频在线高清 | 亚洲AV天堂无码麻豆电影 | 毛片手机在线观看 | 亚洲人成网站在线观看90影院 | 永久免费在线观看视频 | 色综合五月激情综合色一区 | 在线 自拍 综合 亚洲 欧美 | chinese情侣自拍啪hd |