呵呵,什么原因不好解说
1:确认你test.htm存在
解决方案 »
- php伪造ip建立与服务器的socket连接
- 用哪种数据库比较好(PHP+mysql做中转)
- 用其他帐号(比如QQ msn)登录自己的网站,需要怎么做呀??
- httpd启动时为何老是报这个错误
- PHP新手,求教大神!!
- mysql问题:怎样将一字段记录递加到另一字段?
- 初试PHP,请问PHP的论坛数据库版和文本版那种好些啊?
- 这是什么错误:Cannot send session cache limiter
- 大侠请帮忙!!
- 如何让PHP文件只接受Form的输入,不能让用户真接输入!
- 用top关键词搜索出前几条数据,怎么写啊?
- 要建一个社团(以后可能是公司)的论坛,是使用php技术的论坛社区,要求实用,不用太花哨,稳定,无版权问题,请推荐一个,谢谢
$tpl->template_dir=__TEMPLATES_PATH;,或确定你的TEST.HTM是否存在
<?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");
?>
各位大哥看看呀!