> Smarty模板引擎中文在线手册 > $config_booleanize [配置布尔化变量]

$config_booleanize
配置布尔化变量

If set to true, config file values of on/true/yes and off/false/no get converted to boolean values automatically. This way you can use the values in the template like so: {if #foobar#} ... {/if}. If foobar was on, true or yes, the {if} statement will execute. true by default.
如果该变量设为真,配置文件中的on/true/yes 和 off/false/no值会自动转化为布尔值.这样的话,你就可以在模板中像{if #foobar#} ... {/if}这样使用这些值了.如果foobar为on, true 或 yes,那么 {if}语句就会执行了.默认情况下,该变量值为真.

上一篇:
下一篇: