龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

基于smarty模版的配置文件代码

时间:2014-07-22 14:51来源: 作者: 点击:
分享到:
基于smarty模版的配置文件代码
基于smarty模版的配置文件代码
<?php
include_once "../Smarty/Smarty.class.php";
$smarty=new Smarty();
$smarty->template_dir="../templates/";//静态页面
$smarty->compile_dir="../tmp_c";//编译文件
$smarty->config_dir="../configs/";//配置文件
$smarty->cache_dir="../cache/";//缓存文件
//配置定界符
$smarty->left_delimiter="{%";
$smarty->right_delimiter="%}";
//引入adodb文件
include_once "../adodb/adodb.inc.php";
//创建一个adodb数据库对象
$db=newadoconnection("mysql");
$db->connect("localhost","root","123456","JerSey_DB");
$db->execute("set names utf8");
?>
精彩图集

赞助商链接