Heim > Artikel > Backend-Entwicklung > smarty目录有关问题
smarty目录问题
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
nbsp;html>
{{include file=$main}}
23
bb
?