수정해도 처음 업로드 이미지만 계속 나오는 썸네일 정보
수정해도 처음 업로드 이미지만 계속 나오는 썸네일
본문
아래 소스 입니다.
업로드한 이미지가 리스트에 썸네일로 나오는 게시판 인데,
이미지를 수정해도 처음에 업로드한 이미지만 계속 썸네일로 나옵니다.
무엇이 문제일까요?
----------------------------------- 소스 ----------------------------------
<? include "$g4[path]/thumbEngine/dq_thumb_engine2.php"; //DQ엔진 인클루드 2005-03-22 석훈 ?>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$ex6_filed = explode("|",$list[$i][wr_6]);
$ext6_06 = $ex6_filed[6]; // 거래방법
$ext6_07 = $ex6_filed[7]; // 거래상황
$ext6_08 = $ex6_filed[8]; // 희망가
?>
<tr height=60 align=center>
<td width="50">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/icon_notice.gif\">";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span style='font:bold 11px tahoma; color:#E15916;'>{$list[$i][num]}</span>";
else
echo "<span style='font:normal 11px tahoma; color:#B3B3B3;'>{$list[$i][num]}</span>";
?>
</td>
<? if ($is_checkbox) { ?><td width=40><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td width="60" align="center">
<?
//섬네일 관련 설정
$thumb_width=50;//섬네일 최대폭
$thumb_height=40;//섬네일 최대높이
$dqEngine['thumb_resize'] = 0;
// 0, 1, 2 사용
// 0: 원본 비율 대칭 리사이즈, 1: 비율유지 안함(찌그러짐), 2: 원본비율 리사이즈 + Center Crop
$image = $list[$i][file][0][file]; //공백으로인한썸네일깨짐방지
//$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
$thumbdir = $g4[path]."/data/file/".$bo_table."/img";
if (!is_dir($thumbdir)) {
@mkdir($thumbdir, 0707);
@chmod($thumbdir, 0707);
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
$file = $thumbdir."/index.php";
$f = @fopen($file, "w");
@fwrite($f, "");
@fclose($f);
@chmod($file, 0606);
}
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg = $thumbdir."/".$list[$i][wr_id].".thumb";
make_thumb($thumb_width,$thumb_height,$thumbsource,$thumbimg);
@chmod($thumbimg, 0707);
echo "<a href='{$list[$i][href]}'><img src='$thumbimg' border='0' style='border:1 #E7E7E7 solid' onmouseover=this.style.filter='alpha(opacity=70)' onmouseout=this.style.filter=''></a>";
} else {
echo "<a href='{$list[$i][href]}'><img src='$board_skin_path/img/noimg.gif' width='{$thumb_width}' height='{$thumb_height}' style='border:1 #E7E7E7 solid'></a>";
}
?>
</td>
업로드한 이미지가 리스트에 썸네일로 나오는 게시판 인데,
이미지를 수정해도 처음에 업로드한 이미지만 계속 썸네일로 나옵니다.
무엇이 문제일까요?
----------------------------------- 소스 ----------------------------------
<? include "$g4[path]/thumbEngine/dq_thumb_engine2.php"; //DQ엔진 인클루드 2005-03-22 석훈 ?>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$ex6_filed = explode("|",$list[$i][wr_6]);
$ext6_06 = $ex6_filed[6]; // 거래방법
$ext6_07 = $ex6_filed[7]; // 거래상황
$ext6_08 = $ex6_filed[8]; // 희망가
?>
<tr height=60 align=center>
<td width="50">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/icon_notice.gif\">";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span style='font:bold 11px tahoma; color:#E15916;'>{$list[$i][num]}</span>";
else
echo "<span style='font:normal 11px tahoma; color:#B3B3B3;'>{$list[$i][num]}</span>";
?>
</td>
<? if ($is_checkbox) { ?><td width=40><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td width="60" align="center">
<?
//섬네일 관련 설정
$thumb_width=50;//섬네일 최대폭
$thumb_height=40;//섬네일 최대높이
$dqEngine['thumb_resize'] = 0;
// 0, 1, 2 사용
// 0: 원본 비율 대칭 리사이즈, 1: 비율유지 안함(찌그러짐), 2: 원본비율 리사이즈 + Center Crop
$image = $list[$i][file][0][file]; //공백으로인한썸네일깨짐방지
//$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
$thumbdir = $g4[path]."/data/file/".$bo_table."/img";
if (!is_dir($thumbdir)) {
@mkdir($thumbdir, 0707);
@chmod($thumbdir, 0707);
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
$file = $thumbdir."/index.php";
$f = @fopen($file, "w");
@fwrite($f, "");
@fclose($f);
@chmod($file, 0606);
}
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg = $thumbdir."/".$list[$i][wr_id].".thumb";
make_thumb($thumb_width,$thumb_height,$thumbsource,$thumbimg);
@chmod($thumbimg, 0707);
echo "<a href='{$list[$i][href]}'><img src='$thumbimg' border='0' style='border:1 #E7E7E7 solid' onmouseover=this.style.filter='alpha(opacity=70)' onmouseout=this.style.filter=''></a>";
} else {
echo "<a href='{$list[$i][href]}'><img src='$board_skin_path/img/noimg.gif' width='{$thumb_width}' height='{$thumb_height}' style='border:1 #E7E7E7 solid'></a>";
}
?>
</td>
댓글 전체
$thumbimg = $thumbdir."/".$list[$i][wr_id].".thumb";
↓
$thumbimg = $thumbdir."/".$image;
↓
$thumbimg = $thumbdir."/".$image;
유아원님 감사합니다.^^