ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
<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.display.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.fetch.html">Next</a></td> </tr></tbody></table> # enableSecurity()[开启安全] Name enableSecurity() ― enables template security 开启模板安全检测 Description string enableSecurity(string securityclass); string enableSecurity(object securityobject); string enableSecurity(); This enables securty checking on templates. It uses the following parameters: securityclass is an optional parameter. It's the name of the class with defines the security policy parameters. securityobject is an optional parameter. It's the object with defines the security policy parameters. For the details how to setup a security policy see the Security section. See also disableSecurity(), and Security. 本函数开启模板的安全检测。其参数如下: “securityclass”是个可选参数。其值为声明安全策略参数的类名。 “securityobject”是个可选参数。其值为声明安全策略参数的对象。 更多关于安全策略的设置查看安全章节。参见[disableSecurity()](#)和[安全](#)。 <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.display.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.fetch.html">Next</a></td> </tr><tr><td valign="top" align="left" width="33%">display()<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%">fetch()<br/> 获取输出的内容 </td> </tr></tbody></table>