1、页面文件后缀为php
<table>
<tr>
<td><?php include "左部程序"; ?></td>
<td><?php include "模板处理程序"; ?></td>
<td><?php include "右部程序"; ?></td>
</tr>
</table>2、先经phplib模板处理
模板:
<table>
<tr>
<td><?php include "左部程序"; ?></td>
<td>{var}</td>
<td><?php include "右部程序"; ?></td>
</tr>
</table>程序:
<?php
$tpl = new template();
....
$tpl->parse("out","root");
$s = $tpl->get_var("out");
eval("?>$s;");
?>
<table>
<tr>
<td><?php include "左部程序"; ?></td>
<td><?php include "模板处理程序"; ?></td>
<td><?php include "右部程序"; ?></td>
</tr>
</table>2、先经phplib模板处理
模板:
<table>
<tr>
<td><?php include "左部程序"; ?></td>
<td>{var}</td>
<td><?php include "右部程序"; ?></td>
</tr>
</table>程序:
<?php
$tpl = new template();
....
$tpl->parse("out","root");
$s = $tpl->get_var("out");
eval("?>$s;");
?>
<table>
<tr>
<td><?php include "左部程序"; ?></td>
<td>{var}</td>
<td><?php include "右部程序"; ?></td>
</tr>
</table>模版文件不是HTM文件么?可以为动态的PHP文件么?好象不行呀
楼主的方法可以么?
而这个静态HTML文件页面中,左边是引用另外一个动态PHP程序,
中间是新闻的详细内容(已经用模版实现)。