Home  >  Article  >  Backend Development  >  TPWhy does this if judgment display nothing?

TPWhy does this if judgment display nothing?

WBOY
WBOYOriginal
2016-12-01 01:27:341138browse

既不显示aaa也不显示bbb这是为什么?

<code><if condition="isset(session('name'))">
aaa
<else />
bbb
</if></code>

回复内容:

既不显示aaa也不显示bbb这是为什么?

<code><if condition="isset(session('name'))">
aaa
<else />
bbb
</if></code>

把session('name")换成$Think.session.name或者Think.session.name试一试。

可能是模板缓存,删缓存再跑一次

判断的等号是双 == 不是单等 =

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