本文给大家分享的是织梦系统中首页调用图片集里的多张图片的方法,有相同需要的小伙伴可以参考下。
先找到include/common.inc.php文件,把下面代码贴进去(我贴的是我网站上的,具体可根据需要修改):
function Getimg($aid,$imgwith,$imgheight)
{
global $dsql;
$imgurls = '';
$row =$dsql->getone( "select imgurls from dede_addonimages where aid='$aid' ");
$imgurls= $row['imgurls'];//获取字段数据
preg_match_all("/\}.+jpg/",$imgurls,$matches);//取出符合条件的
$new_arr=array_unique($matches[0]);//去除数组中重复的值
$pic_num1="