关于使用smarty如何将输出存为变量
test.php:
$tpl=new Smarty;
$tpl->assign('a','lily');
$tpl->assign('b','eric');
$tpl->display('test.tpl');
----------------------------------
test.tpl
<html>
<body>
my Name is:{$a}<br/>
your Name is:{$b}
</body>
</html>
如上的2个文件
我如何将$tpl->display('test.tpl')的输出内容不输出只保存到变量呢
想得到的结果是类似于这样的一个字符串
"<html><body>my Name is:lily<br/>your Name is:Eric</body></html>"
smarty有没有这种函数呢.如
$html_string=smarty->某方法('test.tpl');