0
我目前首次使用Smarty-php,但我正在努力将if语句放在{include}下方。Smarty PHP添加了一个{if}语句并包含一个tpl
{include './header.tpl'}
每当我做下面的事情时,我得到一个500错误。
{if $smarty.get.special is not "ajax"}
{include './header.tpl'}
{/if}
我目前首次使用Smarty-php,但我正在努力将if语句放在{include}下方。Smarty PHP添加了一个{if}语句并包含一个tpl
{include './header.tpl'}
每当我做下面的事情时,我得到一个500错误。
{if $smarty.get.special is not "ajax"}
{include './header.tpl'}
{/if}
它应该是:
{if $smarty.get.special != "ajax"}
{include file='./header.tpl'}
{/if}
的is [not]
语法可以偶数或奇数用于检查的值是(或不是)。
你能发布错误日志吗? –
为什么这个问题关于smarty和PHP,但它被标记为任务并行库? –