썸네일 이미지 문의드립니다.
본문
아래와같이 작업했는데요
$thumb = G5_URL."/data/file/".$ss_board."/thumb/".$it_name;
이부분때문에 이미지를 못불러오는듯합니다.
고수님들 조언부탁드립니다. 썸네일뒤에 thumb/ 뒤에 경로를 못불러와요 ㅠㅠ
for ($i=1; $i<=$tv_idx; $i++)
{
$tv_it_id = get_session("ss_tv[$i]");
list($ss_board, $ss_wr_id) = explode('|', $tv_it_id);
if ($ss_board == $tv_tbl)
{
$row = sql_fetch(" select bf_file from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
$it_name = get_text(addslashes($row['bf_file']));
$thumb = G5_URL."/data/file/".$ss_board."/thumb/".$it_name;
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
$size = getimagesize($thumb);
$tw = $size[0] /2;
$th = $size[1]/2;
$img = "<a href='".G5_BBS_URL."/board.php?bo_table=".$ss_board."&wr_id=".$ss_wr_id."'><img src='$thumb' width='100' height='100' style='padding:1px 0; border:none;'/></a>";
echo "goods_link[$i] = \"{$img}<br/>\";\n";//<span class=small>".cut_str($it_name,10,"")."</span>
}
}
?>
답변 1
음...it_name가
첨부파일로 올라와진 이미지 파일을 의미할텐데...
혹시 에디터 형태로 올라온 이미지를 찾는게 아닌가요 ?
저런식으로 구현을 하는것보다...
그누보드5 자체에 잇는 썸네일 함수를 사용하는게 맞을것 같습니다.