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

· 2013-02-21 (목) 13:32:12 · 897 · 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 조회 992
13-02-21 조회 1,699
13-02-21 조회 923
13-02-21 조회 1,072
13-02-21 조회 931
13-02-21 조회 1,711
13-02-21 조회 1,032
13-02-21 조회 916
13-02-21 조회 829
13-02-21 조회 1,045
13-02-21 조회 813
13-02-21 조회 1,039
13-02-21 조회 920
13-02-21 조회 1,069
13-02-21 조회 1,129
13-02-21 조회 898
13-02-21 조회 908
13-02-21 조회 730
13-02-21 조회 585
13-02-21 조회 873