根据TP 3.2.2手册,模板中 if 标签可以在condition属性里面使用php代码,例如:
<if condition="strtoupper($user['name']) neq 'THINKPHP'">ThinkPHP
<else /> other fr
amework
</if>
但是我尝试在使用strpos ,却不起作用。比如
<if condition="strpos('P1', 'P') eq 0">ThinkPHP
<else /> other framework
</if>
请各位同学指点。