최신글이미지 noimage 노이미지 끌어오는 소스좀 써주세요

최신글이미지 noimage 노이미지 끌어오는 소스좀 써주세요

QA

최신글이미지 noimage 노이미지 끌어오는 소스좀 써주세요

답변 1

본문

소스는 이렇거든요

 

<?php               
                        $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);                    
                        if($thumb['src']) {
                            $img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';
                        } else {
                            $img_content = 'NO IMAGE';
                        }               
                        echo $img_content;                          
    ?>​

 

여기서 no image 에서 gif 를 끌어와야 이미지가 없을때 등록되는 노이미지를 끌어오려합니다

 

이 질문에 댓글 쓰기 :

답변 1

$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);       

$no_img = "$latest_skin_url/img/noimg.gif"; 

이렇게 $no_img​ 한줄 추가하고..

 

$img_content = 'NO IMAGE';

여기를 이렇게 바꿔보세요.​

$img_content = '<img src="'.$no_img.'" width="'.$imgwidth.'" height="'.$imgheight.'" />'; 

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 99
© SIRSOFT
현재 페이지 제일 처음으로