小弟刚接触smarty,大家帮我看看
index.php:
include "smarty_inc.php";//调用smarty配置文件
$smarty = new Smarty;
$smarty->assign('articleTitle', 'Police begin campaign to rundown jaywalkers.');
$smarty->display('index.tpl');index.tpl:
<{$articleTitle|capitalize}>
显示:Fatal error: Smarty error: unable to write to $compile_dir '/smb/xujun/templates_c'. Be sure $compile_dir is writable by the web server user. in /smb/xujun/mysmarty/Smarty.class.php on line 1093
哪里出错了?
配置文件是这样:
require_once ("./mysmarty/Smarty.class.php");
$smarty = new Smarty(); $smarty->template_dir = './templates/';
$smarty->compile_dir = './templates_c/';
$smarty->config_dir = './configs/'; $smarty->cache_dir = './cache/'; $smarty->caching = false; $smarty->left_delimiter = "<{";
$smarty->right_delimiter = "}>";
感激不尽!
index.php:
include "smarty_inc.php";//调用smarty配置文件
$smarty = new Smarty;
$smarty->assign('articleTitle', 'Police begin campaign to rundown jaywalkers.');
$smarty->display('index.tpl');index.tpl:
<{$articleTitle|capitalize}>
显示:Fatal error: Smarty error: unable to write to $compile_dir '/smb/xujun/templates_c'. Be sure $compile_dir is writable by the web server user. in /smb/xujun/mysmarty/Smarty.class.php on line 1093
哪里出错了?
配置文件是这样:
require_once ("./mysmarty/Smarty.class.php");
$smarty = new Smarty(); $smarty->template_dir = './templates/';
$smarty->compile_dir = './templates_c/';
$smarty->config_dir = './configs/'; $smarty->cache_dir = './cache/'; $smarty->caching = false; $smarty->left_delimiter = "<{";
$smarty->right_delimiter = "}>";
感激不尽!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货