使用Smarty的简要配置

来源:互联网 发布:java实现单链表 编辑:程序博客网 时间:2024/05/20 04:11

<?php
define('ROOT',str_replace("/","//",$_SERVER['DOCUMENT_ROOT']).'//');
define('LIB_SMARTY',ROOT.'libs//');
define('TEMPLATES',ROOT.'templates');
require_once(LIB_SMARTY.'Smarty.class.php');
$Smarty=new Smarty();
$Smarty->compile_check=true;
$Smarty->debugging=false;
$Smarty->template_dir=TEMPLATES;
$Smarty->config_dir=ROOT.'demo//configs';
$Smarty->compile_dir=ROOT.'demo//templates_c';
$Smarty->cache_dir=ROOT.'demo//cache';
$Smarty->left_delimiter='<%{';
$Smarty->right_delimiter='}%>';

?>

原创粉丝点击