function s_smarty_tpl($tpl) { if (!is_file($tpl) || !is_readable($tpl)) { return s_err_arg('no suce file of ' . $tpl); } $smarty = s_smarty_object(); try { return $smarty->fetch($tpl); } catch (SmartyException $se) { return s_log($se->getMessage()); } }
function s_smarty_tpl($tpl, &$assign = false) { if (!is_file($tpl) || !is_readable($tpl)) { return s_err_arg('no suce file of ' . $tpl); } $smarty = s_smarty_object(); try { $smarty->assign($assign); } catch (SmartyException $se) { } return $smarty->fetch($tpl); }