{/eq}" is enough."/> {/eq}" is enough.">
search
HomePHP FrameworkThinkPHPWhat to do if thinkphp eq fails?

What to do if thinkphp eq fails?

Dec 05, 2022 am 11:31 AM
thinkphpeq

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"}

{/eq}" is enough.

What to do if thinkphp eq fails?

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools