이미지 경로로 썸네일 만들기 정보
이미지 경로로 썸네일 만들기본문
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('이미지 경로').'">';
추천
0
0
댓글 0개