Smarty3.1.4
BOY
这个作者很懒,什么都没留下…
展开
-
Smarty 函数注册
<?php include "../smarty.inc.php"; $smarty->assign("data","hello"); /* * 注册一个函数 * */ $smarty->registerPlugin("function","show","show"); /* * 注册一个块 * * */ $smar原创 2011-11-14 08:31:43 · 2070 阅读 · 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 · 489 阅读 · 0 评论 -
Smarty foreach Section
<?php include "../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 · 465 阅读 · 0 评论