php smarty模板中,如何根据条件引入.html文件 include

{if $type eq true}
{include file="a.html"}
{else}
{include file="b.html"}
{/if}
这样做怎么也不行啊。
还有这样也是行不通的,
{include file="{$url}" }
好像不支持嵌套标记,在线等答案

如果$type为BOOL类型就不需要用EQ TRUE
{if $type}
{include file="A.html"}
{else}
{include file="B.html"}
{/if}
你要确定template目录下有这两个HTML文件

参考资料:www.tlbar.com.cn

温馨提示:答案为网友推荐,仅供参考
相似回答