티스토리 뷰
<?
// 이미지 width 와 height 구하기
$imgSize = GetImageSize("$_SERVER[DOCUMENT_ROOT]/upLoad/miniGallery/$rowDataGallery[fileName]");
$imgWidth = $imgSize[0];
if($imgWidth > 600) {
$imgWidth = 600;
}
$imgHeight=$imgSize[1];
?>
< tr>
<td align="center" style="padding-top:10px;"><img src="/upLoad/miniGallery/<?=$rowDataGallery[fileName]?>" alt="<?=$rowDataGallery[fileName]?>" width="<?=$imgWidth?>" /></td>
< /tr>
======================================================================================================================
Data types of the output array for getimagesize().
[0] = The width of the image. It is integer data type.
[1] = The height of the image. It is an integer data type.
[2] = Image Type Flag. It is an integer data type.
[3] = String for <img> tag (width="xxx" height="xxx"). It is a string data type.
[bits] = Number of bits. It is an integer data type.
[channels] = Number of channels. It is an integer data type.
[mime] = MIME type. It is a string data type.
< script src="http://prattler22.tistory.com/plugin/CallBack_bootstrapper?&src=http://s1.daumcdn.net/cfs.tistory/v/0/blog/plugins/CallBack/callback&id=26&callbackId=prattler22tistorycom26430&destDocId=callbacknestprattler22tistorycom26430&host=http://prattler22.tistory.com&float=left&random=208"></script>
'Language > PHP' 카테고리의 다른 글
DB 연결 - dbconn.inc (0) | 2015.11.29 |
---|---|
XML 문서파싱 - SAX 방식, DOM 방식 (0) | 2015.11.29 |
XML 참조 (0) | 2015.11.29 |
현제페이지 주소 알아내기 (0) | 2015.11.29 |
달력 (0) | 2015.11.29 |