[摘要](dtmp < ttmp); 14 15 else 16 cflag=true; 17 18 if(!cflag) //使用存在的文件 19 20 readfile(tmpfile); 2...
($dtmp < $ttmp);
14 }
15 else
16 $cflag=true;
17
18 if(!$cflag) //使用存在的文件
19 {
20 readfile($tmpfile);
21 exit;
22 }
23
24 //创建新的文件
25 include "template.class.php3";
26
27 $fp=fopen($incfile, "r");
28 $content=fread($fp, filesize($incfile));
29 fclose($fp);
30
31 //下面进行模版处理
32 $t = new Template("template", "keep");
33
34 $t->set_file("contentfile","content.ihtml");
35
36 $t->set_var(
37 array(
38 "content"=>$content
39 ));
40
41 $t->parse("outputcontent","contentfile");
42
43 $fp=fopen($tmpfile, "w");
44 if($fp)
45 {
46 flock($fp, 3);
47 fwrite($fp, $t->get_var("outputcontent"));
48 flock($fp, 1);
49 fclose($fp);
50 }
51 $t->p("outputcontent");
?>
--------------------------------------------------------------------------------
先向大家介绍一下我的目录结构:
/---bin/ 执行程序目录
关键词:容易的页面缓冲技术