<?php
require("./Smarty/libs/Smarty.class.php");
$smarty=new Smarty;
$smarty->left_delimiter="{{";
$smarty->right_delimiter="}}";
$smarty->assign("main","./templates/a.html");
$smarty->display("./templates/xx.html");
?>
为什么这里$smarty->assign("main","./templates/a.html")就不可以,
$smarty->assign("main","templates/a.html");?和$smarty->assign("main","a.html");?都可以呢,目录结构是
xx.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p>{{include file=$main}}</p>
<p>23</p>
</body>
</html>
a.html内容
<p style="background-color: red">bb</p>?
以下是目录结构

------解决方案--------------------
smarty 模板?