Smarty: Unable to load template file 'login.tpl'
来源:互联网 发布:php sendmail 发邮件 编辑:程序博客网 时间:2024/05/21 17:09
配置smarty模板文件夹路径时出现问题:
Smarty: Unable to load template file 'login.tpl'
原先使用原先配置命令:
$smarty->template_dir="../templates/";
输出路径,
foreach ($smarty->template_dir as $key => $value) {
# code...
echo "--$value";
}
发现配置路径命令没起作用。
原因:在Smarty 3.1之后,$template_dir属性不能直接访问,需使用 getTemplateDir(), setTemplateDir() 和addTemplateDir()来进行存取。
解决方法:$smarty->setTemplateDir("../templates/");
成功!
1 0
- Smarty: Unable to load template file 'login.tpl'
- Unable to load template file 'rj\ThinkPHP/Tpl/dispatch_jump.tpl'----thinkphp3.2.3
- struts2 Unable to load file
- [VSS] Unable to Open User Login File
- VSS Unable to Open User Login File
- Unable to Open User Login File
- Exception starting filter login Unable to load configuration. - action
- Unable to load configuration. - action - file
- Unable to load string table file:
- Unable to Unable to load configuration. - bean - jar:file
- VSS2005 出现 Unable to Open User Login File 问题
- 【服务器】关于错误:Smarty:unable to write file
- Smarty 在sinaapp部署中遇到的问题Uncaught --> Smarty: unable to write file sinaapp
- Proxool Provider unable to load JAXP configurator file: proxool.xml
- SSH整合问题:Unable to load configuration. - bean - jar:file:/
- Proxool Provider unable to load JAXP configurator file: proxoolconf.xml
- Unable to load configuration. - action - file:/...../struts.xml 解决方法
- Unable to load configuration. - action - file:/……
- Android WebView 禁止缩放(手势、点击)
- storyboard 的一些简单应用
- VLC播放 RTP流的 音频 视频的 sdp描述文件
- 模拟赛4 数字序列 50分做法 状压DP
- Java四种线程池的使用
- Smarty: Unable to load template file 'login.tpl'
- 单例模式
- JavaWeb实现图片异步上传,在前台展示,并以二进制保存到数据库
- 蓝桥杯第三届 奇怪的比赛
- hdoj 1205 吃糖果 【鸽巢原理】
- SQLite 数据库获取添加记录后自增长的ID
- Java中常用设计模式总结
- 排列组合公式和写法
- 着色页(Color pictures to the real picture)