$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$thumb = $thumb_path.'/'.$wr_id;
if ($_FILES[bf_file][name][0])
{
$row = sql_fetch(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '0' ");
$file = $data_path .'/'. $row[bf_file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $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 = $thu_width / $size[0];
$height = (int)($size[1] * $rate);
@unlink($thumb_path.'/'.$wr_id);
$dst = imagecreatetruecolor($thumb_width, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
if ($size[2] == 1) imagegif($dst, $thumb, $thumb_quality);
else if ($size[2] == 2) imagejpeg($dst, $thumb, $thumb_quality);
else if ($size[2] == 3) imagepng($dst, $thumb, $thumb_quality);
chmod($thumb, 0606);
}
}
섬내일 생성은 되는데요~ 섬내일 성성후 재수정하면 섬내일이 수정이 안되는데요
고수님들 아시는분~~
$thumb_path = $data_path.'/thumb';
$thumb = $thumb_path.'/'.$wr_id;
if ($_FILES[bf_file][name][0])
{
$row = sql_fetch(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '0' ");
$file = $data_path .'/'. $row[bf_file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $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 = $thu_width / $size[0];
$height = (int)($size[1] * $rate);
@unlink($thumb_path.'/'.$wr_id);
$dst = imagecreatetruecolor($thumb_width, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
if ($size[2] == 1) imagegif($dst, $thumb, $thumb_quality);
else if ($size[2] == 2) imagejpeg($dst, $thumb, $thumb_quality);
else if ($size[2] == 3) imagepng($dst, $thumb, $thumb_quality);
chmod($thumb, 0606);
}
}
섬내일 생성은 되는데요~ 섬내일 성성후 재수정하면 섬내일이 수정이 안되는데요
고수님들 아시는분~~
댓글 2개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기