get_images 이 소스관련 예제 좀 보여주세요
본문
회원사진등록할려고하는데 get_images 걸 사용하라고하시는데
이거에대한 예제가 없어서요..
부탁드립니다^^;;
답변 2
아 회원사진 등록이요? get_images라 적어두셨길래요
사진 등록은 그누에 기본적으로 되어 있을텐데요..
/bbs/register_form_update.php // 아이콘 업로드 부분을 참조하세요.
// 이미지를 얻는다
function get_image($img, $width=0, $height=0, $img_id='')
{
global $g5, $default;
$full_img = G5_DATA_PATH.'/item/'.$img;
if (file_exists($full_img) && $img)
{
if (!$width)
{
$size = getimagesize($full_img);
$width = $size[0];
$height = $size[1];
}
$str = '<img src="'.G5_DATA_URL.'/item/'.$img.'" alt="" width="'.$width.'" height="'.$height.'"';
if($img_id)
$str .= ' id="'.$img_id.'"';
$str .= '>';
}
else
{
$str = '<img src="'.G5_SHOP_URL.'/img/no_image.gif" alt="" ';
if ($width)
$str .= 'width="'.$width.'" height="'.$height.'"';
else
$str .= 'width="'.$default['de_mimg_width'].'" height="'.$default['de_mimg_height'].'"';
if($img_id)
$str .= ' id="'.$img_id.'"'.
$str .= '>';
}
return $str;
}
답변을 작성하시기 전에 로그인 해주세요.