Uncaught exception 'SmartyException' with message 'Missing template name in SMARTY
问题 I want change content of a block with a condition (isset($file)) but i saw an error Missing template name when i run my code public function food_list() { $m_food=new M_food(); $arr=$m_food->food_list(); $smarty=new Smarty_restaurant(); $smarty->assign("title","New food"); //$smarty->assign("file","../../views/v_food_list.tpl"); //$smarty->assign("arr",$arr); $smarty->display ("food_list.tpl"); } And this is food_list.tpl file {extends file="index.tpl"} {block name="head"}{include file="head