no img 출력 문제좀 풀어주세요..미치겠어요..ㅜ.,ㅡ > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

no img 출력 문제좀 풀어주세요..미치겠어요..ㅜ.,ㅡ 정보

no img 출력 문제좀 풀어주세요..미치겠어요..ㅜ.,ㅡ

본문

php를 알면 되는데 모르니까..너무 힘들어요..
배움이 짧다 보니,,질문 답변 아무리 뒤져도 제 실력으로는 밤샘도 소용이 없나 봅니다.
상품 설명 페이지에 이미지가 없을때 어떻게 처리 해야 할까요.
이미지가 no_img로 뛌으면 합니다.
작은 이미지를 좀더 키우고 싶기도 한데 어느곳을 수정해야 할까요?

==================================================================
<table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td height="9" colspan="3"><img src="<?= $board_skin_path?>/img/progress/skin_top.gif" width="300" height="9"></td>
                            </tr>
                            <tr>
                                <td width="9" background="<?= $board_skin_path?>/img/progress/skin_left.gif">&nbsp;</td>
                                <td width="300" height="300">
<?
// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
if($i > 0){
$style= "style=\"display:none\"";
}
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=280 height=280 border=0 id=img$i $style>";
$thumimg[$i]="&nbsp;<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=30 height=20 border=0 id=ThumbImage$i onfocus=\"javascript:ThumbViewer(this)\" onmouseover=\"javascript:ThumbViewer(this)\">";
}
?> </td>
                                <td width="9" valign="top" background="<?= $board_skin_path?>/img/progress/skin_right.gif"><img src="<?= $board_skin_path?>/img/progress/skin_right_img.gif" width="9" height="5"></td>
                            </tr>
                            <tr>
                                <td colspan="3"><img src="<?= $board_skin_path?>/img/progress/skin_down.gif" width="300" height="9" /></td>
                          </tr>
                            <tr>
                                <td colspan="3" height="5"></td>
                            </tr>
                            <tr>
                                <td colspan="3" height="30" align="right">
<?php
echo $thumimg[0];
echo $thumimg[1];
echo $thumimg[2];
echo $thumimg[3];
?> </td>
                            </tr>
                        </table>
  • 복사

댓글 전체

이미지 사이즈를 크게 하는건 코드 중 이 부분에 맨 마지막 부분에,
$thumimg[$i]="&nbsp;<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=30 height=20
width 와 height 값을 더 크게 변경하시면 될 듯 한데요.
없는 이미지를 no img로 나오게 하려면 onfocus=\"javascript:ThumbViewer(this) 부분에 보이시는 것처럼... javascript부분을 수정해야 하는데요...
아니면 원 소스에는 no img라는 img파일을 불러 오도록 코딩이 되어 있는데, 해당 파일이 없어서 안 나올 수 도 있으니, 이미지 파일 경로에 해당 파일이 있는지도 확인해 보세요.
© SIRSOFT
현재 페이지 제일 처음으로