作者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