社区
基础编程
帖子详情
smarty问题??
chf99cn
2004-12-01 03:59:36
Warning: Smarty error: unable to read template resource: "test.htm" in E:\smarty\comm\Smarty.class.php on line 1040
这是什么原因??
...全文
101
4
打赏
收藏
smarty问题??
Warning: Smarty error: unable to read template resource: "test.htm" in E:\smarty\comm\Smarty.class.php on line 1040 这是什么原因??
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
chf99cn
2004-12-02
打赏
举报
回复
我的测试代码:main.php
<?php
//include "comm/smarty.class.php";
require ('./comm/Smarty.class.php');
define ('_SITE_ROOT','E:/smarty');
$tp1=new smarty();
$tp1->template_dir=_SITE_ROOT."./templates/";
$tp1->templates_c=_SITE_ROOT."./templates_c/";
$tp1->config_dir=_SITE_ROOT."./configs/";
$tp1->cache_dir=_SITE_ROOT."./cache/";
$tp1->left_delimiter="{/";
$tp1->right_delimiter="/}";
?>
test.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<{$title}>
<br>
<{$content}>;
</BODY>
</HTML>
test.php
<?php
include "main.php";
$tp1->assign("title","测试用的网页");
$tp1->assign("content","测试用的网页内容");
$tp1->display("test.htm");
?>
各位大哥看看呀!
chf99cn
2004-12-02
打赏
举报
回复
有呀,都存在呀???
死胖子
2004-12-01
打赏
举报
回复
嗯,,看看你的模板路径有没有设置错误
$tpl->template_dir=__TEMPLATES_PATH;
,或确定你的TEST.HTM是否存在
wxq4100798
2004-12-01
打赏
举报
回复
呵呵,什么原因不好解说
1:确认你test.htm存在
smarty
3 的应用详解
$
smarty
=
Smarty
::instance(); 模板 之前的
smarty
模板,相当于重新定义了一套标签语言,那么
smarty
3提供了一种新的模板形式,直接支持php语法的模板。 但是
问题
就出来了,我们还有必要用模板吗? 引用php类型模板...
php手册、mysql手册、
smarty
手册、adodb手册
1. What is
Smarty
? [什么是Smaty?] 2. Installation [安装] Requirements [安装] Basic Installation [基本安装] Extended Setup [扩展设置] II.
Smarty
For Template Designers [模板设计者篇] 3. Basic ...
PHP
smarty
手册
1. What is
Smarty
? [什么是Smaty?] 2. Installation [安装] Requirements [安装] Basic Installation [基本安装] Extended Setup [扩展设置] II.
Smarty
For Template Designers [模板设计者篇] 3. Basic ...
smarty
,php编写新闻管理系统
新闻管理系统(显示),用php+
smarty
编写,功能齐全
smarty
php手册
我们可以想象
smarty
应该有怎样的最后表现。我们知道php代码如果没有了模板解析的开销将有多快,我们也知道从一般的美工看来php语言是多么的"恐怖",然而这一切可以被一种更简单的模板语法掩饰掉。我们应该怎样把这两...
基础编程
21,886
社区成员
140,364
社区内容
发帖
与我相关
我的任务
基础编程
从PHP安装配置,PHP入门,PHP基础到PHP应用
复制链接
扫一扫
分享
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章