头部尾部引入怎么做的
<!-- #BeginLibraryItem "/include_test/header.dwt" --><!-- EenLibraryItem -->
为什么写那句代码就引入了模板,原理是什么,用到了什么,过程是怎样的
<!-- #BeginLibraryItem "/include_test/header.dwt" --><!-- EenLibraryItem -->
为什么写那句代码就引入了模板,原理是什么,用到了什么,过程是怎样的
2016-07-14
smarty框架中
<{include file="header.tpl" title="使用Smarty模板完成网站开发"}>
<table border="1" align="center" width="90%" cellpadding="3" cellspacing="0">
<caption><h1> <{$tableName}></h1></caption>
<tr bgcolor="#cccccc">
<th>编号</th><th>姓名</th><th>性别</th><th>年龄</th><th>电子邮件</th>
</tr>
<{foreach $users as $k=>$v }>
<tr>
<{foreach $v as $key=>$value}>
<{if $key =="sex"}>
<{if $value == "男"}>
<td bgColor="red">男</td>
<{elseif $value == "女"}>
<td bgColor="green"> 女 </td>
<{else}>
<td bgColor="blue"> 未知 </td>
<{/if}>
<{else}>
<td> <{$value}> </td>
<{/if}>
<{/foreach}>
</tr>
<{/foreach}>
</table>
<center>共查找到<b> <{$rowNum}> </b>条记录</center>
<{include file="footer.tpl" author="开发者"}>举报