我写的第一个引用模板的PHP文件
1.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>测验</title>
</head>
你好吗?{fg}<br>
<body>
这是我写的第一个用模板程式:{dg}
</body>
</html>
1.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>怪石网络</title>
</head>
<?php include ('zh/lib/template.php');
?>
<?php
$con=new Template();
$con->set_file("main","1.htm");
$con->set_var("fg","helloworld");
$df="你非常强这么快就学会了";
$con->set_var("dg",$df);
$con->parse("mains","main");
$con->p("mains");
?>
<body>
</body>
</html>