dede模板直接读取上传附件图片代码 按照id获取

  {dede:php}

global $dsql;
$currfield = $refObj->Fields;
$sql='Select url From `dede_uploads` where title = "channel_banner_'.$currfield['id'].'"  limit 1 ';
$aaa = $dsql->GetOne($sql);
echo "<div style='background-position: center center;background-repeat: no-repeat;background-size: cover;background-image: url( ".$aaa['url'].");' class='fixed-parallax parallax-fullwidth'> </div>";
{/dede:php}