if($ctag->GetName()=="img")
{
$row = array();
$row['imgsrc'] = trim($ctag->GetInnerText());
$row['text'] = $ctag->GetAtt('text');
$images[] = $row;
}
我们只需在里面插入$row['litpic'] =$ctag->GetAtt('ddimg'); 即可解决
这样我们在{productimagelist}中使用[field:litpic/]获取到图片的缩略图,达到优化页面加载速度! 原文链接:https://www.f2er.com/dedecms/403981.htmlif($ctag->GetName()=="img")
{
$row = array();
$row['imgsrc'] = trim($ctag->GetInnerText());
$row['text'] = $ctag->GetAtt('text');
$row['litpic'] =$ctag->GetAtt('ddimg'); //得到缩略图
$images[] = $row;
}