[請益] smarty在架站出現的錯誤

看板PHP作者 (阿U)時間13年前 (2012/05/13 23:29), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串1/1
google了好久 似乎沒什麼人有解答過 錯誤內容: Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'article_list.tpl.htm'' in /home/vol6/byethost16.com/b16_10678969/htdocs/DEMO/BLOG/smarty/sysplugins/smarty_internal_templatebase.php:127 Stack trace: #0 /home/vol6/byethost16.com/b16_10678969/htdocs/DEMO/BLOG/smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('article_list.tp...', NULL, NULL, NULL, true) #1 /home/vol6/byethost16.com/b16_10678969/htdocs/DEMO/BLOG/wwwroot/index.php(32): Smarty_Internal_TemplateBase->display('article_list.tp...') #2 {main} thrown in /home/vol6/byethost16.com/b16_10678969/htdocs/DEMO/BLOG/smarty/sysplugins/smarty_internal_templatebase.php on line 127 我的main.php: include "../smarty/Smarty.class.php"; define('__SITE_ROOT', 'http://sing10407.byethost16.com/DEMO/BLOG'); // 最 後沒有斜線 $tpl = new Smarty(); $tpl->template_dir = __SITE_ROOT . "/templates/"; $tpl->compile_dir = __SITE_ROOT . "/templates_c/"; $tpl->config_dir = __SITE_ROOT . "/configs/"; $tpl->cache_dir = __SITE_ROOT . "/cache/"; $tpl->left_delimiter = '<{'; $tpl->right_delimiter = '}>'; 請問有沒有大大遇過類似問題呢? 幫解答! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.22.18.56

05/14 00:30, , 1F
恩… 不要用 smarty 就是最佳解法(誤
05/14 00:30, 1F

05/14 01:25, , 2F
__SITE_ROOT 不是填網址
05/14 01:25, 2F

05/14 12:32, , 3F
最後改成絕對路徑後解決 謝謝大家
05/14 12:32, 3F
文章代碼(AID): #1FhzDbag (PHP)
文章代碼(AID): #1FhzDbag (PHP)