destoon调用供应产品图片的函数方法


来源: https://destoon.cc/ 时间: 2019-03-01 22:12:11 人气: 800 评论: 0

$albums =  get_albums($item, 1);
<img src="{$albums[0]}" />

方法如下:

    
    function get_albums($item, $type = 0) {
        $imgs = array();
        if($item['thumb'] && !preg_match("/^[a-z0-9\-\$/i", $item['thumb'])) $item['thumb'] = '';
        if($item['thumb1'] && !preg_match("/^[a-z0-9\-\$/i", $item['thumb1'])) $item['thumb1'] = '';
        if($item['thumb2'] && !preg_match("/^[a-z0-9\-\$/i", $item['thumb2'])) $item['thumb2'] = '';
        if($type == 0) {
            $nopic = DT_SKIN else if($type == 1) {
            $nopic = DT_SKIN
        return $imgs;
    }



destoon调用供 标签调用

评论
346655709