初次接触模板,不知道哪有错误,请指点一下
index.php
<?php
include_once("..\Smarty\comm\libs\Smarty.class.php");
$smarty=new Smarty();
$smarty->template_dir="..\Smarty\templates";
$smarty->compile_dir="..\Smarty\templates_c";
$smarty->left_delimiter="<{";
$smarty->right_delimiter="}>";
$smarty->assign("name","李晓军");
$smarty->display("index.tpl");
?>
index.tpl
{include file="header.tpl"}
大家好,我叫{$name},欢迎大家阅读我的smarty学习材料。
{include file="foot.tpl'}
header.tpl
<html>
<head>
<title>大师兄smarty教程</title>
</head>
<body>
foot.tpl
<hr>
<center>CopyRight(C) by 大师兄 2004年8月 Email:
[email protected]</center>
<hr>
</body>
</html>
出错Smarty error: unable to read resource: "index.tpl" in E:\php\AppServ\comm\libs\Smarty.class.php on line 1095
不知道哪里错了,各位帮忙解决一下,谢了