当我在 Smarty 中遇到问题时,我会收到一条肮脏的错误消息。
如何启用调试模式或如何获得明确的错误消息?
这是一个示例错误:
Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'list.tpl'' in
H:\Server\FrameWork\smarty\libs\sysplugins\smarty_internal_templatebase.php:127
Stack trace: #0 H:\Server\FrameWork\smarty\libs\sysplugins\smarty_internal_templatebase.php(374):
Smarty_Internal_TemplateBase->fetch('news/li...', NULL, NULL, NULL, true) #1
H:\Server\news\list.php(157): Smarty_Internal_TemplateBase->display('news/li...') #2
H:\Server\news\news.php(24): include('H:\Serve...') #3 H:\Server\sec.php(13):
include('H:\Serve...') #4 {main} thrown in
H:\Server\FrameWork\smarty\libs\sysplugins\smarty_internal_templatebase.php on line 127