织梦DedeCMS调用单个图集中图片数量的方法
发布时间:2020-07-03 10:44:10  所属栏目:CMS系统  来源:互联网 
            导读:织梦DedeCMS调用单个图集中图片数量的方法 修改方法: 打开 /include/common.func.php 文件 增加如下函数: function Getimgnum($aid){global $dsql;$imgurls = ;$row =$dsql-getone( Select imgurls From `dede_addonimages` where aid=$aid );$imgur
                
                
                
            | 
                         织梦DedeCMS调用单个图集中图片数量的方法 修改方法: 打开 /include/common.func.php 文件 增加如下函数: 
 getone( "Select imgurls From `dede_addonimages` where aid='$aid' ");
$imgurls= $row['imgurls'];
preg_match_all("/{dede:img (.*){/dede:img/isU",$imgurls,$wordcount);
$count=count($wordcount[1]);
return $count;
}
调用方法: 
 
                         | 
                  
