多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
<table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Header navigation table"><tbody><tr><th align="center" colspan="3">Smarty - the compiling PHPtemplate engine</th> </tr><tr><td valign="bottom" align="left" width="25%"><a accesskey="P" href="api.get.registered.object.html">Prev</a></td> <td valign="bottom" align="center" width="50%">Chapter 13. Smarty Class Methods()</td> <td valign="bottom" align="right" width="25%"><a accesskey="N" href="api.get.template.vars.html">Next</a></td> </tr></tbody></table> # getTags()[获取标签] Name getTags() ― return tags used by template 返回在模板中使用的标签 Description string getTags(object template); This function returns an array of tagname/attribute pairs for all tags used by the template. It uses the following parameters: template is the template object. 本函数返回从模板中获取的所有“标签名/属性”对数组。其参数如下: “template”参数为模板对象。 <table width="80%" border="0" cellpadding="2" cellspacing="2" class="note"><caption> 提示 </caption> <tr><td>Note<br/> This function is experimental.<br/> 本函数是实验性的。</td> </tr></table> <table class="EXAMPLE" cellspacing="0" cellpadding="0" border="0" width="100%"><tbody><tr><td> <div class="EXAMPLE"><strong><a name="AEN31322" id="AEN31322"/><span class="PROGRAMLISTING">Example 13.22. getTags()</span></strong><b><br/></b><table width="100%" bgcolor="#e0e0e0" border="0"><tbody><tr><td> <pre class="PROGRAMLISTING">&lt;?phpinclude('Smarty.class.php');$smarty = new Smarty;// create template object$tpl = $smarty-&gt;createTemplate('index.tpl');// get tags$tags = $smarty-&gt;getTags($tpl);print_r($tags);?&gt;</pre></td> </tr></tbody></table></div></td> </tr></tbody></table> <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Footer navigation table"><tbody><tr><td valign="top" align="left" width="33%"><a accesskey="P" href="api.get.registered.object.html">Prev</a></td> <td valign="top" align="center" width="34%"><a accesskey="H" href="index.html">Home</a></td> <td valign="top" align="right" width="33%"><a accesskey="N" href="api.get.template.vars.html">Next</a></td> </tr><tr><td valign="top" align="left" width="33%">getRegisteredObject()<br/> 获取已注册的对象</td> <td valign="top" align="center" width="34%"><a accesskey="U" href="api.functions.html">Up</a></td> <td valign="top" align="right" width="33%">getTemplateVars()<br/> 获取模板变量的值</td> </tr></tbody></table>