<!--{if $login.regtime-$smarty.now >7200 }-->
</div>
<div class="search_cont_l">
<label class="t"> </label>
<button type="submit" id="btn_search_uid"><span>搜 索</span></button>
</div>
<!--{else}-->
</div>
<div class="search_cont_l">
<label class="t"> </label>
<button type="submit" onClick="{if(confirm('确定要删除吗?一旦删除无法恢复。')){return true;} return false;}" id="btn_search_uid"><span>搜 索</span></button>
</div>
<!--{/if}-->
上面这个判断语句运行报错:Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "E:\PHPnow-1.5.6\htdocs\tpl/templets/default/9izbdq_user_advsearch.tpl" on line 112 " <!--{if $login.regtime-$smarty.now >7200 }--> " - Unexpected " }-->", expected one of: "|" , "}-->" , " " , "*" , "/" , "%" , "+" , "-" , ""&"" , ISIN , ISDIVBY , ISNOTDIVBY , ISEVEN , ISNOTEVEN , ISEVENBY , ISNOTEVENBY , ISODD , ISNOTODD , ISODDBY , ISNOTODDBY , "==" , "!=" , "(>,gt)" , "(<,lt)" , "(>=,ge)" , "(<=,le)" , "===" , "!==" , "(%,mod)" , "(&&,and)" , "(||,or)" , "xor"' in E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templatecompilerbase.php:423 Stack trace: #0 E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templateparser.php(2802): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templateparser.php(2867): Smarty_Internal_Templateparser->yy_syntax_error(10, ' }-->') #2 E:\PHPnow-1.5.6\htdoc in E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 423
求解错误原因在哪?
</div>
<div class="search_cont_l">
<label class="t"> </label>
<button type="submit" id="btn_search_uid"><span>搜 索</span></button>
</div>
<!--{else}-->
</div>
<div class="search_cont_l">
<label class="t"> </label>
<button type="submit" onClick="{if(confirm('确定要删除吗?一旦删除无法恢复。')){return true;} return false;}" id="btn_search_uid"><span>搜 索</span></button>
</div>
<!--{/if}-->
上面这个判断语句运行报错:Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "E:\PHPnow-1.5.6\htdocs\tpl/templets/default/9izbdq_user_advsearch.tpl" on line 112 " <!--{if $login.regtime-$smarty.now >7200 }--> " - Unexpected " }-->", expected one of: "|" , "}-->" , " " , "*" , "/" , "%" , "+" , "-" , ""&"" , ISIN , ISDIVBY , ISNOTDIVBY , ISEVEN , ISNOTEVEN , ISEVENBY , ISNOTEVENBY , ISODD , ISNOTODD , ISODDBY , ISNOTODDBY , "==" , "!=" , "(>,gt)" , "(<,lt)" , "(>=,ge)" , "(<=,le)" , "===" , "!==" , "(%,mod)" , "(&&,and)" , "(||,or)" , "xor"' in E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templatecompilerbase.php:423 Stack trace: #0 E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templateparser.php(2802): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templateparser.php(2867): Smarty_Internal_Templateparser->yy_syntax_error(10, ' }-->') #2 E:\PHPnow-1.5.6\htdoc in E:\PHPnow-1.5.6\htdocs\source\core\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 423
求解错误原因在哪?
有问题!
请用记事本打开 E:\PHPnow-1.5.6\htdocs\tpl/templets/default/9izbdq_user_advsearch.tpl 观察这个地方书写的是否正确
<form method="post" action="<!--{$appfile}-->?c=user&a=list" id="search_high_level">
<input type='hidden' id="s_searchtype" name="s_searchtype" value="adv" />
<div class="search_cont_l">
<label class="t">会员ID:</label>
<input type="text" name="s_uid" id="s_uid" style="height:22px; padding:3px 5px;border:1px solid; border-color:#adadad #e0e0e0 #e0e0e0 #adadad;width:150px;margin-right:10px; background:#fcfcfc;vertical-align:middle;" /> (输入会员ID)
</div>
<div class="search_cont_l">
<label class="t"> </label>
<button type="submit" id="btn_search_uid"><span>搜 索</span></button>
</div>
</form>
<!--{else}-->
<form method="post" action="<!--{$appfile}-->?c=user&a=list" id="search_high_level">
<input type='hidden' id="s_searchtype" name="s_searchtype" value="adv" />
<div class="search_cont_l">
<label class="t">会员ID:</label>
<input type="text" name="s_uid" id="s_uid" style="height:22px; padding:3px 5px;border:1px solid; border-color:#adadad #e0e0e0 #e0e0e0 #adadad;width:150px;margin-right:10px; background:#fcfcfc;vertical-align:middle;" /> (输入会员ID)
</div>
</div>
<div class="search_cont_l">
<label class="t"> </label>
<button type="submit" onClick="{if(confirm('确定要删除吗?一旦删除无法恢复。')){return true;} return false;}" id="btn_search_uid"><span>搜 索</span></button>
</div>
</form>
<!--{/if}-->
求解错误在哪?
<!--{if $login.regtime-$smarty.now >7200 }-->
改成
<!--{if $login.regtime-$smarty.now > 7200 }-->
或
<!--{if $login.regtime-$smarty.now qt 7200 }-->可能是 >7200 未分开的原因
:<!--{$login.regtime}-->
:<!--{$smarty.now}-->不过错误信息表述的是:条件表达式有问题