이미지 경로 지정 도와주세요!

이미지 경로 지정 도와주세요!

QA

이미지 경로 지정 도와주세요!

답변 5

본문

c31fe25c7f4cd4164f913243d4259b72_1406910980_9256.png
 

기본 ​갤러리  게시판인데요 이미지를 안 올린 글은 위에 처럼 나오는게 보기싫어서요  

이미지로 대체 하려구요 이미지는 만들어서 업로드 했구요 경로는 img/noimg90.png 입니다.

skin - board - galley - list.skin.php에서  아래 인거 같은데 어디를 얼마큼 지우고 어떤 소스를 

어떻게 적어줘야되는지 알고 싶습니다. 소스까지 자세히 적어주세요 ㅜㅡ

 

 } else {

                            $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';

                        } 


​
<ul class="gall_con">
                <li class="gall_href">
                    <a href="<?php echo $list[$i]['href'] ?>">
                    <?php
                    if ($list[$i]['is_notice']) { // 공지사항  ?>
                        <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
                    <?php } else {
                        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
 
                        if($thumb['src']) {
                            $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
                        } else {
                            $img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
                        }
 
                        echo $img_content;
                    }
                     ?>
                    </a>
                </li> 

이 질문에 댓글 쓰기 :

답변 5

$img_content​ = "<img src=".$board_skin_url."/img/noimg90.png>"; 

나와야 하는데 ㅠ 이상하군요

if($thumb['src']) {
12                            $img_content '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
13                        else {

 

$img_content​ = $board_skin_url."/img/noimg90.png​";

}

 echo $img_content;
18                    }

 

답변감사합니다.  말씀해주신대로
$img_content​ = $board_skin_url."/img/noimg90.png​"; 넣었는데 이미지는 안나오고 홈페이지에
http://아이디.cafe24.com/skin/board/galleryimg/noimg90.png 나옵니다 ㅜㅡ 이미지는 최상단 img 폴더에다 넣었습니다

$img_content​ = '<img src=".$board_skin_url."/img/noimg90.png​>'; 

이렇게 해야 될텐데 img 를 깜빡했네요

$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>'; 

 

이 부분을

$img_content = '<img src="'.G5_IMG_URL.'/noimg90.png​">';​

이렇게 바꿔보세요.

그리고 no img 경로가 루트에 있는 img 폴더에 있는게 맞으시죠?
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 24
© SIRSOFT
현재 페이지 제일 처음으로