phplib template 关于html加载的问题
phplib template是不是不同同时在一个文件里面加载不同文件夹下的html模版的啊
比方说
文件夹 tpl_1 -> header.htm
文件夹 tpl_2 -> foot.htm
文件夹 inc -> template.inc
根目录 index.php
希望在index.php里面通过模版 放入 header.htm 和 foot.htm
加载一个模版可以这么写:
<?php
require "inc/template.inc"; //*1
$tpl = new Template("tpl_1"); //*2
$tpl -> set_file("main","header.htm") //*3
$tpl -> parse("mains","main"); //*4
$tpl -> p("mains"); //*5
?>
现在要加载两个不同文件夹下的文件好象比较困难