이미지 경로로 썸네일 만들기

· 9년 전 · 7361
[code]
function absurl($path) {
$path = str_replace( '', '/', $path );
return ( ( isset($_SERVER['HTTPS']) ) ? 'https://' : 'http://' ) . str_replace( $_SERVER['DOCUMENT_ROOT'] , $_SERVER['SERVER_NAME'] . '' , $path);

}

function thumb($path, $width = 320, $height = 180) {
include_once(G5_LIB_PATH."/thumbnail.lib.php");
$filename = end(explode("/", $path));
$path = dirname($path);
return absurl($path."/".thumbnail($filename, $path, $path, $width, $height, false, true));
}

// echo '<img src="'.thumb('이미지 경로').'">';
[/code]
|
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
9년 전 조회 6,540
9년 전 조회 4,986
9년 전 조회 1.1만
9년 전 조회 9,210
9년 전 조회 5,917
9년 전 조회 1.9만
9년 전 조회 1.1만
9년 전 조회 5,845
9년 전 조회 4,613
9년 전 조회 8,406
9년 전 조회 5,414
9년 전 조회 7,379
9년 전 조회 5,027
9년 전 조회 1.3만
9년 전 조회 7,362
9년 전 조회 1만
9년 전 조회 5,976
9년 전 조회 8,538
9년 전 조회 6,184
9년 전 조회 7,809
9년 전 조회 6,674
9년 전 조회 6,559
9년 전 조회 9,543
9년 전 조회 5,940
9년 전 조회 2만
9년 전 조회 8,781
9년 전 조회 5,505
9년 전 조회 2.8만
9년 전 조회 7,504
9년 전 조회 5,803
🐛 버그신고