也就是类似于 将模版文件包括smarty标签 写入 数据库内读取出来仍然能够替换该代码执行,类似于ASP新闻系统的 模版概念

解决方案 »

  1.   

    参考
    http://smarty.php.net/manual/en/template.resources.php
    这里的
      Example 15-9. Using custom resources
      

  2.   

    查看smarty的eval用法

    1.php
    =====================
    ...
    $smarty->assign("x","cc");
    $smarty->assign("b",'abcd{$x}');1.tpl
    ========================
    {$b}/*--out put:abcd{$x}--*/{eval var=$b assign="d"}
    {$d}/*--out put:abcdcc--*/