background 로 사용하는 방법좀 알려주세요 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

background 로 사용하는 방법좀 알려주세요 정보

background 로 사용하는 방법좀 알려주세요

본문

출처 : http://www.sir.co.kr/bbs/tb.php/g4_tiptech/5062

<?
switch($bo_table){
case "게시판이름1":
$boardTitle = "<img src={$g4['path']}/img/z.gif border=0>";
break;
case "게시판이름2":
$boardTitle = "<img src={$g4['path']}/img/z.gif border=0>";
break;
case "게시판이름3":
$boardTitle = "<img src={$g4['path']}/img/z.gif border=0>"; 
break;
case "게시판이름4":
$boardTitle = "<img src={$g4['path']}/img/z.gif border=0>";
break;
}
?>

출력할위치에

<?=$boardTitle?>
-----------------------------
이런식으로 사용하고 싶은데 이건 틀린방법이고
<table width='100%' border='0' cellspacing="0" cellpadding="0" background=<?=$boardTitle?>><tr><td>

어떻게 넣어야 하나요??

댓글 전체

이미지 넓이와 높이를 일정하게 하신다음

<table border='0' cellspacing="0" cellpadding="0">><tr><td background=<?=$boardTitle?> width='넓이' height='높이'></td></tr></table>

하시면 될듯하지 않을까요?

이미지 넓이와 높이가 일정하지 않다면....
$t_img=getimagesize($boardTitle);//이미지 사이즈 구하는 함수
$t_img[0] //이게 이미지 넓이가 되고여
$t_img[1] //이게 이미지 높이가 됩니다.

<table border='0' cellspacing="0" cellpadding="0">><tr><td background=<?=$boardTitle?> width='<?=$t_img[0]?>' height='<?=$t_img[1]?>'></td></tr></table>
위에서 봤을때 값을 출력해보면
<table width='100%' border='0' cellspacing="0" cellpadding="0" background=<img src=이미지경로/img/z.gif border=0>> 이런 형식나오는데 이런형식은 못 봤습니다.

$boardTitle = "<img src={$g4['path']}/img/z.gif border=0>";


$boardTitle = "$g4[path]/img/z.gif"


바꾸셔야 겠네요
전체 98 |RSS
그누4 질문답변 내용 검색

회원로그인

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