我的前台PHPLIB用法如:
test.php<?
include("template.inc");
$name="1111";
$tmplt=new Template();
$tmplt->set_file("hd1","test.html");
$tmplt->parse("out","hd1");
$tmplt->p("out");
?>
test.html<table width="100%" border="1" cellspacing="0">
<tr>
<td>{name}</td>
</tr>
</table>1。那后台也用PHPLIB好点吗?还是PHP代码嵌入HTML代码好?
2。后台添加文章用PHPLIB生成静态页面是怎么样的?
我的思路是: 数据库插入
再
ob_start(); //启动输出缓存
include "../test.php"; //执行程序
$buffer = ob_get_contents(); //取出输出缓存
$filename = "../test111111.html";
$fp = fopen($filename,"w");
fwrite($fp,$buffer); //写入文件
fclose($fp);
ob_end_clean(); //输出并关闭输出缓存
3。这种思路好不?高手们还有什么思路?
test.php<?
include("template.inc");
$name="1111";
$tmplt=new Template();
$tmplt->set_file("hd1","test.html");
$tmplt->parse("out","hd1");
$tmplt->p("out");
?>
test.html<table width="100%" border="1" cellspacing="0">
<tr>
<td>{name}</td>
</tr>
</table>1。那后台也用PHPLIB好点吗?还是PHP代码嵌入HTML代码好?
2。后台添加文章用PHPLIB生成静态页面是怎么样的?
我的思路是: 数据库插入
再
ob_start(); //启动输出缓存
include "../test.php"; //执行程序
$buffer = ob_get_contents(); //取出输出缓存
$filename = "../test111111.html";
$fp = fopen($filename,"w");
fwrite($fp,$buffer); //写入文件
fclose($fp);
ob_end_clean(); //输出并关闭输出缓存
3。这种思路好不?高手们还有什么思路?
2, 基本思想大多于此,产生具体页面内容的过程不一样罢了