问答详情
源自:5-3 Smarty的配置与实例化

Smarty配置

//老师给看看为什么运行了什么都没有,代码都正确啊,而且源码我这里运行的时候也是空白……


<?php

require ('../smarty/Smarty.php');

$smarty = new Smarty();


$smarty->left_delimiter = "{";

$smarty->right_delimiter = "}";

$smarty->template_dir = "tpl";

$smarty->compile_dir = "template_c";

$smarty->cache_dir = "cache";


$smarty->caching = true;

$smarty->cache_lifetime = 120;


$smarty->assign('articletitle','文章标题'); 

$smarty->display("test.tpl");



提问者:倾城恋雨 2014-11-11 15:12

个回答

  • 慕设计7419916
    2015-03-11 16:41:07

    路径指向对么