{dede:php}
$thisid = $refObj->Fields['aid'];
$totrow=$dsql->GetOne('select * from dede_addonsoft where aid='.$thisid);
if($totrow['softlinks']!='')
{
echo "<a href=\"/plus/download.php?open=0&aid=".$thisid."&cid=1\" style=\"color:white\" target=\"_blank\">下载地址</a>";
}
{/dede:php}
上面有if判断了,就差你给他加上一个else形成互斥条件了
{dede:php}
$thisid = $refObj->Fields['aid'];
$totrow=$dsql->GetOne('select * from dede_addonsoft where aid='.$thisid);
if($totrow['softlinks']!='')
{
echo "<a href=\"/plus/download.php?open=0&aid=".$thisid."&cid=1\" style=\"color:white\" target=\"_blank\">下载地址</a>";
}else{
echo "<p color="red">没有下载地址</p>";
}
{/dede:php}
那就在第8行后面加个else语句,打印没有下载地址的提示。