php smarty 初学者 10

Warning:Smartyerror:unabletoreadresource:"index.tpl"inD:\smarty\libs\Smarty.class.php... Warning: Smarty error: unable to read resource: "index.tpl" in D:\smarty\libs\Smarty.class.php on line 1092

$smarty->template_dir = 'd/AppServ/www/phptest/smarty/templates';
$smarty->config_dir = 'd/AppServ/www/phptest/smarty/configs';
$smarty->cache_dir = 'd:/smarty/smarty_cache';
$smarty->compile_dir = 'd:/smarty/smarty_templates_c';
这四个路径都应该指向什么路径
展开
 我来答
hansuper88
2008-11-24 · TA获得超过6627个赞
知道小有建树答主
回答量:838
采纳率:0%
帮助的人:710万
展开全部
你的错误意思是未识别的不能读取的文件 index.tpl 。要用 htm 做模板文件的扩展名 index.htm

$smarty->template_dir = 'd/AppServ/www/phptest/smarty/templates';
//模板文件存储的路径

$smarty->config_dir = 'd/AppServ/www/phptest/smarty/configs';
配置文件存储的路径

$smarty->cache_dir = 'd:/smarty/smarty_cache';
模板缓存存储的路径(一般为空)

$smarty->compile_dir = 'd:/smarty/smarty_templates_c';
//smarty 生成的模板文件存储的路径(和你的模板文件一样只是文件名不一样)
百度网友07d52fe
2008-11-24 · TA获得超过195个赞
知道小有建树答主
回答量:568
采纳率:0%
帮助的人:494万
展开全部
有时间看一下smarty.class.php文件,那里面是smarty类的定义,相信看过之后会明白很多……
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友c2b998e
2008-11-24 · TA获得超过115个赞
知道小有建树答主
回答量:486
采纳率:0%
帮助的人:307万
展开全部
不要把路径定死了
建议定义个站点根目录的常量
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式