지

성형전후 사진 섬내일 1,2

· 2013-02-21 (목) 13:32:12 · 905 · 2
$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);
}
}

섬내일 생성은 되는데요~ 섬내일 성성후 재수정하면 섬내일이 수정이 안되는데요

고수님들 아시는분~~
|

댓글 2개

2013-02-21 (목) 17:03:44
감사드립니다~ 사진2번째 파일도 섬내일 수정가능하나요??
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-02-21 조회 1,005
13-02-21 조회 1,714
13-02-21 조회 930
13-02-21 조회 1,077
13-02-21 조회 938
13-02-21 조회 1,738
13-02-21 조회 1,043
13-02-21 조회 924
13-02-21 조회 839
13-02-21 조회 1,055
13-02-21 조회 820
13-02-21 조회 1,047
13-02-21 조회 930
13-02-21 조회 1,079
13-02-21 조회 1,138
13-02-21 조회 906
13-02-21 조회 917
13-02-21 조회 739
13-02-21 조회 598
13-02-21 조회 884