그런데, 왜 get_it_image 에서 it 있는 거죠?

그런데, 왜 get_it_image 에서 it 있는 거죠?

QA

그런데, 왜 get_it_image 에서 it 있는 거죠?

본문

/theme/basic/shop/orderinquiryview.php

 

$image = get_it_image($row['it_id'], 55, 55);
위의 코드는 아래의 라이브러리에서 이미지를 불러오는 코드 같아요.

그런데, get_it_image 에서  왜 it 가 있는 거죠?

 

아래의 라이브러리는 

function get_image($img, $width=0, $height=0, $img_id='')

it 가 없고 get_image 인데 ..

어떻게 get_it_image 가 get_image를 불러올 수 있는지요?

 

 

/lib/shop.lib.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;
}
 

이 질문에 댓글 쓰기 :

답변 2

해당 파일에 get_it_image 함수도 별도로 존재합니다.

function get_it_image($it_id, $width, $height=0, $anchor=false, $img_id='', $img_alt='', $is_crop=false)

 

PS. it :  상품(item) 의미

답변을 작성하시기 전에 로그인 해주세요.
전체 16,776
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT