作者sing10407 (阿U)
看板PHP
標題[請益] smarty在架站出現的錯誤
時間Sun May 13 23:29:38 2012
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
1F:推 kusoayan:恩… 不要用 smarty 就是最佳解法(誤 05/14 00:30
2F:→ arrack:__SITE_ROOT 不是填網址 05/14 01:25
3F:→ sing10407:最後改成絕對路徑後解決 謝謝大家 05/14 12:32