![]() |
帝国模板中可以用if...elsefi...if吗?
可以,直接用php的语法:
if() { } elseif { } else { } . 实例,如文章有来源,则直接发布,如没有, 就发布文章的作者,如作者也没有, 就发布指定的来源. Code:
<? if($navinfor['befrom']!="") {echo $navinfor[befrom];} elseif($navinfor['writer']!="") {echo $navinfor[writer];} else{echo 'www.xuyinews.com.cn';}?> |
| All times are GMT +8. The time now is 04:05 AM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.