{{info}}
{{msg}}
  
  1. $_template->caching = false;
  2. }
  3. // checks if template exists
  4. if (!$_template->source->exists) {
  5. if ($_template->parent instanceof Smarty_Internal_Template) {
  6. $parent_resource = " in '{$_template->parent->template_resource}'";
  7. } else {
  8. $parent_resource = '';
  9. }
  10. throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");
  11. }
  12. // read from cache or render
  13. if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) {
  14. // render template (not loaded and not in cache)
  15. if (!$_template->source->uncompiled) {
  16. /** @var Smarty_Internal_Template $_smarty_tpl
  17. * used in evaluated code
  18. */
  19. $_smarty_tpl = $_template;
  20. if ($_template->source->recompiled) {
  21. $code = $_template->compiler->compileTemplate($_template);
  22. if ($this->smarty->debugging) {
  23. Smarty_Internal_Debug::start_render($_template);
  24. }
  25. try {
  26. ob_start();
  27. eval("?>" . $code);
  28. unset($code);
  29. }
  30. catch (Exception $e) {
  31. ob_get_clean();
  32. throw $e;
  33. }
  34. } else {
  35. if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) {
  36. $_template->compileTemplateSource();
  37. $code = file_get_contents($_template->compiled->filepath);
  38. eval("?>" . $code);
  39. unset($code);
  40. $_template->compiled->loaded = true;
trace调用栈
    
  1. Smarty_Internal_TemplateBase->fetch(...)
  2. app\SmartyView->fetch(...)
  3. rap\web\mvc\Dispatcher->doDispatch(...)
  4. rap\web\Application->start(...)
  5. require(...)