![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Smarty3.1.4
BOY
这个作者很懒,什么都没留下…
展开
-
Smarty 函数注册
<?phpinclude "../smarty.inc.php";$smarty->assign("data","hello");/* * 注册一个函数 * */$smarty->registerPlugin("function","show","show");/* * 注册一个块 * * */$smar原创 2011-11-14 08:31:43 · 2086 阅读 · 1 评论 -
Smaty 的安装
<?php$root = dirname(__FILE__).DIRECTORY_SEPARATOR;define ("ROOT",$root);include ROOT."smarty/Smarty.class.php";$smarty = new Smarty();$smarty->template_dir=ROOT."templates";$sma原创 2011-11-14 08:30:06 · 494 阅读 · 0 评论 -
Smarty foreach Section
<?phpinclude "../smarty.inc.php";$mysqli = new mysqli("localhost","root","","bbs");$mysqli->set_charset("utf8");$result=$mysqli->query("select * from news");/*$data = array();原创 2011-11-14 14:25:25 · 483 阅读 · 0 评论