首页 相关文章 Smarty 入門

Smarty 入門

  序言

!-- START : Block name --

  區域內容

  !-- END : Block name --

  

  這些區塊大部份都會在 PHP 程式中以 if 或 for, while 來控制它們的顯示狀態,雖然樣版看起來簡潔多了,但只要一換了顯示方式不同的樣版, PHP 程式勢必要再改一次!main.php:

?php  include "class/Smarty.class.php";  define('__SITE_ROOT', 'd:/appserv/web/demo'); // 最後沒有斜線  $tpl = new Smarty();  $tpl-template_dir = __SITE_ROOT . "/templates/";  $tpl-compile_dir = __SITE_ROOT . "/templates_c/";  $tpl-config_dir = __SITE_ROOT . "/configs/";  $tpl-cache_dir = __SITE_ROOT . "/cache/";  $tpl-l...[ 查看全文 ]

2016-02-19 标签:

Smarty 入門的相关文章

手机页面
收藏网站 回到头部