1.php
include_once("libs/Smarty.class.php");
$smarty=new Smarty();
$smarty->template_dir="templates";
$smarty->compile_dir="compile";
$smarty->config_dir="config";
$smarty->cache_dir="cache";
$smarty->left_delimiter="{";
$smarty->right_delimiter="}";
?>
2.php
include ("smarty_include.php");
$name="this is an apple!";
$smarty->assign("abc",$name);
$smarty->display("index.html");
?>
index.html
{$abc}
index里面的$abc无法显示出$name的值
2.php里可以显示出this is an apple!
请问这是为什么
Smarty
HTML