关于IF判断语句请大神帮忙

讨论程序使用中的问题
回复
luzhiaiyan
帖子: 4
注册时间: 2016年 10月 9日 21:09

关于IF判断语句请大神帮忙

帖子 luzhiaiyan »

代码: 全选

/*有什么办法让$this->category(',') 不直接显示出来?
写IF判断语句使用$this->category(',')就会直接显示出来,
IF的效果根本没有!
*/
<?php
if ($this->category(',') == 'TEST') {
...

end if
?>
luzhiaiyan
帖子: 4
注册时间: 2016年 10月 9日 21:09

Re: 关于IF判断语句请大神帮忙

帖子 luzhiaiyan »

使用 $this->title() 写判断句 会直接显示网站标题。。 :shock:
头像
ClayMore
帖子: 2481
注册时间: 2007年 11月 29日 02:55
来自: Sleeping Forest
联系:

Re: 关于IF判断语句请大神帮忙

帖子 ClayMore »

if $this->category ==
不要括号



__________________

新版阿里百秀Alibaixiu主题 v11.1 For Typecho
http://xiu.160.me/
头像
m4go
帖子: 857
注册时间: 2010年 3月 29日 02:33
来自: https://www.vpshu.com
联系:

Re: 关于IF判断语句请大神帮忙

帖子 m4go »

代码: 全选

<?php if($this->category == "help"): ?>
//当前分类为help缩略图,则输出内容。
<?php endif; ?>


https://app.typecho.me/coder/14.html
luzhiaiyan
帖子: 4
注册时间: 2016年 10月 9日 21:09

Re: 关于IF判断语句请大神帮忙

帖子 luzhiaiyan »

m4go 写了:

代码: 全选

<?php if($this->category == "help"): ?>
//当前分类为help缩略图,则输出内容。
<?php endif; ?>


https://app.typecho.me/coder/14.html


你好!请问如何循环当前分类下的标签和日期存档?不是循环所有的标签和日期,当页面点击到某个分类下,只循环该分类下的标签和日期!
万分感谢!祝:工作愉快!
回复