썸네일...리스트에서 이미지 변경이 안될경우...

안녕하세요..

글 작성시 등록한 이미지를 교체해도 list 에서는 예전 이미지의 썸네일을 보여주고 있습니다.ㅜㅜ

어느쪽 파일을 봐야 하나요?

참고로 list파일의 이미지 출력부분입니다.



===========[list.skin 소스]============
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";

$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_5]' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$checkbox = "";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $board[bo_5] / $size[0];
$height = (int)($size[1] * $rate);

$dst = imagecreatetruecolor($board[bo_5], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_5], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_6]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}

if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
========================================================



혹시나 잘못된 부분이 있나요?
|

댓글 4개

소스중에 $thumb_path.'/'.$list[$i][wr_id] 두 부분을

$thumb_path . '/' . $list[$i][file][0][file] . '.thumb'로 고쳐보세요.
지적해 주신 소스가 2군데를
소스 위쪽과 아래쪽 모두를 해 보았습니다.

그런데..적용이 안되네요...에러가 뜨거나...이미지가 안뜨거나..
두군데가 아니라 세군데군요...

$thumb = $thumb_path.'/'.$list[$i][wr_id];
.....
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_6]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
아..이제 제대로 되네요...ㅜㅜ

정말 정말 감사합니다.

정말 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
17년 전 조회 1,507
17년 전 조회 1,665
17년 전 조회 1,531
17년 전 조회 1,315
17년 전 조회 4,143
17년 전 조회 939
17년 전 조회 1,208
17년 전 조회 1,518
17년 전 조회 943
17년 전 조회 1,603
17년 전 조회 939
17년 전 조회 1,543
17년 전 조회 1,534
17년 전 조회 1,610
17년 전 조회 1,272
17년 전 조회 1,545
17년 전 조회 1,513
17년 전 조회 1,669
17년 전 조회 958
17년 전 조회 1,536
🐛 버그신고