{/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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.