첨부이미지가 없을때 noimg를 출력하고 싶습니다

첨부이미지가 없을때 noimg를 출력하고 싶습니다

QA

첨부이미지가 없을때 noimg를 출력하고 싶습니다

답변 2

본문

<?php
        // 파일 출력
        $v_img_count = count($view['file']);
        if($v_img_count) {
            echo "<div id=\"slideshow\" style='max-width:620px'>
            <ul class='pgwSlideshow'>
            \n";

            for ($i=0; $i<=count($view['file']); $i++) {
                if ($view['file'][$i]['view']) {
                    //echo $view['file'][$i]['view'];
                    echo get_view_thumbnail2($view['file'][$i]['view']);
                }
            }

            echo "</ul></div>\n";
        }
         ?>

여기에서 첨부파일이 없으면 스킨이미지안에 noimg.gif를 띄우고 싶은데 도와주세요

이 질문에 댓글 쓰기 :

답변 2


            for ($i=0; $i<=count($view['file']); $i++) {
                if ($view['file'][$i]['view']) {
                    //echo $view['file'][$i]['view'];
                    $thum_img = get_view_thumbnail2($view['file'][$i]['view']);
                    if (!$thum_img) {
                      $thum_img = ''<img src="noimg.gif"?;
                    }
                    echo $thum_img;
                }
            }
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 123,713
© SIRSOFT
현재 페이지 제일 처음으로