{/eq}" is enough."/> {/eq}" is enough.">
Home >PHP Framework >ThinkPHP >What to do if thinkphp eq fails?
thinkphp eq failure solution: 1. Open the corresponding tp file; 2. Check the eq tag; 3. Modify the usage method to "{eq name="$vo.adminrole" value="0"} 4bf1b891f6c2dfb01a14225c80f3ce36b90dd5946f0946207856a8a37f441edf{/eq}" is enough.
The operating environment of this tutorial: Windows 7 system, ThinkPHP version 5, Dell G3 computer.
thinkphp What should I do if eq fails?
The problem that eq does not work in tp5
1.The eq tag is used in thinkphp5.0, and the
<eq name="name" value="value"> 相等 <else/> 不相等 </eq>given in the official document
However, what I tested was of no use. I used the version of thinkphp5.0.20. After testing 5.0.15, it still works.
2. I checked on the Internet before about this and that problem, but it didn’t work. I don’t know if they have tested it themselves. Anyway, none of them can be used.
For example:
<eq name="vo.status" value="0">未激活</eq> <eq name="vo.status" value="1">已激活</eq>
You will find that the one above is completely useless, or maybe their version is too excessive. Getting old.
3. Here is my final solution
{eq name="$vo.adminrole" value="0"}<td style="text-align: center">超级管理员</td>{/eq} {eq name="$vo.adminrole" value="1"}<td style="text-align: center">教师管理员</td>{/eq}
$vo.adminrole is a variable in the volist loop list. In this way, refresh the page and it will take effect.
Recommended learning: "thinkPHP Video Tutorial"
The above is the detailed content of What to do if thinkphp eq fails?. For more information, please follow other related articles on the PHP Chinese website!