smarty
codeigniter3整合smarty
Codeigniter 3.0+Smarty-3.1.14 1、下载Smarty类库,并放到CI/Controller/libraries; 2、创建控制器,并加载Smarty类,创建Smarty对象,同时设置Smarty关键目录 <?php defined('BASEPATH') OR exit( ......
smarty 之 if当兵年龄判断
<h2>当兵年龄判断</h2> <{if $smarty.get.age ge 18 and $smarty.get.age le 23}> <font color="blue">你符合当兵的年龄要求!</font> <{else}> <font color="red">年龄不合要求</font> ......
smarty section start step max使用
......<table border="1"> <{section name=i loop=$arrs}> <tr> <{section name=j loop=$arrs[i]}> <td><{$arrs[i][j]}></td> <{/section}> </tr> <{/section}> ......
smarty section循环显示一维数组元素
<?php header("Content-type: text/html; charset=utf-8"); //设置中国时区 date_default_timezone_set('PRC'); require_once("./Smarty/libs/Smarty.class.php"); $sm ......
smarty 显示二维数组
<?php header("Content-type: text/html; charset=utf-8"); //设置中国时区 date_default_timezone_set('PRC'); require_once("./Smarty/libs/Smarty.class.php"); $sm ......
smarty 输出主机名等
1 <?php 2 header("Content-type: text/html; charset=utf-8"); 3 //设置中国时区 4 date_default_timezone_set('PRC'); 5 6 require_once("./Smarty/libs/Smarty.clas ......