smarty 模板 引入文件
来源:互联网 发布:java项目介绍ppt 编辑:程序博客网 时间:2024/05/23 02:23
b.php
<?php
include("../init.inc.php");
$title="smarty学习";
$content="smarty模板的介绍";
//分配变量
$tpl->assign("title",$title);
$tpl->assign("content",$content);
//调用模板文件
//./tpl/a.html
$tpl->display("./tpl1/a.tpl");
?>
a.tpl
<html>
<head>
<title> <{$title}> </title>
<link rel="stylesheet" href="../css/*.css">
</head>
<body>
<img src="../tpl/tpl1/1.jpg" >
<i> <{$content}> </i>
</body>
</html>
init.inc.php
<?php
require ("../libs/Smarty.class.php");
define('ROOT','D:/wamp/www/smartyMB/smarty/');
//创建模板对象
$tpl = new Smarty();
$tpl->template_dir = ROOT.'tpl';
$tpl->compile_dir = ROOT.'tpl_c';
$tpl->left_delimiter = '<{';
$tpl->right_delimiter ='}>';
?>
下载smarty模板
- smarty 模板 引入文件
- 在smarty模板引入jquery
- php用Smarty模板生成html文件
- 使用Dreamweaver编辑Smarty tpl模板文件
- php用Smarty模板生成html文件
- php文件缓存smarty模板的应用
- Smarty模板文件中的一般变量
- >+ smarty 模板
- smarty 模板
- smarty模板
- smarty模板
- smarty模板
- smarty模板
- smarty模板
- smarty 模板
- smarty模板
- smarty模板
- smarty模板
- Flash与游戏的完美结合
- Java中,对接口的理解
- oracle ash buffer大小算法
- 简单标签与带属性的标签
- Eclipse里常用快捷键
- smarty 模板 引入文件
- Troubleshooting - Using Azure Dev Fabric Log File
- smarty的安装与配置
- Jsp防盗链标签
- smarty的注意事项
- Linux下bin文件的安装
- 怎么做301永久重定向
- 卷七、七言乐府
- 小小计算器