<?= $this->listBuffer[$i][subject] ?> 이건 무슨 뜻
글쓴이: kimyh / 작성시간: 화, 2005/05/17 - 3:22오후
공개 소스를 구해다가 싸이트를 만들고 있는중인데 아래와같은 구문이
많이 쓰여 있는데 이해를 잘 못해서요.
<?= $this->listBuffer[$i][subject] ?> 이것이
바로 subject의 값으로 출력되던데 이걸 echo 로 바꾸어 나타내게 하려면 어떻게 바꾸어 지는지요.
그리고 <? $this->listBuffer[$i][subject] ?>
이런식으로 <? 옆에 =를 빼면 제대로 값이 찍히지를 않더군요.
아마 리스트 버퍼의 i 번째에 있는 subject의 값을 출력 하라는 의미같은데
echo를 쓰는것과 어떤경우에 이런식으로 쓰는건지 모르겠군요.
그리고 또 listBuffer는 어디에서있는건지 찾을수도 없습니다.
$this-> 가 구체적으로 무었을 의미 하는지 알려주시면 감사하겠습니다.
Forums:


아마도
은
과 동일합니다.
echo를 사용하는 경우는 php 스크립트내에서 html 코드를 출력할때 편하고요, <?= ... ?>는 html 코드 내에서 간단한 php 스크립트를 삽입할때 편합니다.
감사합니다. 근데 링크거는게 않보여요?
답변 감사합니다.
그런데 이 소스가 게시판 소스중 리스트 제목의 내용을 출력 하느내용인데요
<td class=darkgray><?= $this->listBuffer[$i][subject] ?></td>
위의 어디에도 링크를 거는곳이 없는데도 글보기 페이지로 제목의 내용을 클릭하면 넘어가는데 왜 링크거는게 않보이나요?
살며 그리고 사랑하며...
정보는 공유할때 그 가치가 있는것.....
나의 조그만 지식공유는 남에게 엄청난 기쁨을 안겨 준다.
글세요..
전체적인 소스를 보지 않아서 잘 모르겠지만,
$this->listBuffer[$i][subject] 이 부분에 저장된 값이,
"<a href =' > </>" 머 이런 값이 들어 있는게 아닐까요?
한번 웹브라우져에서 $this->listBuffer[$i][subject]가 어떤식으로 변하는지 확인해보세요.. ^^
Re: <?= $this->listBuffer[$i][subject] ?> 이건 무슨
$this-> 는 PHP 중 class 에서 쓰는 문법 입니다.
php.net 에서 calss 부분 참조 하시거나 phpschool.com 같은 곳에 문의 하시면 좀 더 빠른 답변 얻으실수 있을듯 합니다.
그리고..
listBuffer[$i][subject]
부분은.. 어디선가 선언 되었을 텐데...
소스 위쪽 부분에, include 나 require 같은 문 없는지요. 잘 찾아 보시면 찾으실수 있을듯 합니다.
아님.. 전체 소스를 올려 주시는 것도 답변에 도움이 될듯 합니다.
아.. 그리고.. class 에 대한 부분은
http://kr2.php.net/manual/kr/ref.classobj.php
여기를 참조 하시면 됩니다.
답변 감사합니다. 소스 전체 입니다.
답변 감사합니다.
전체 소스 올려드립니다.
도저히 못찾겟군요.
인크루된게 없어요.
죄송 합니다. BB코드가 않되네요.
<? /* //[글 내용 관련 변수] 아래의 변수를 참고하여 스킨을 제작하시면 됩니다. $this->bbsBuffer[code] //테이블명 $this->bbsBuffer[bbs_id] //카테고리값 $this->bbsBuffer[id] //글 고유번호 $this->bbsBuffer[page] //현재 페이지 $this->bbsBuffer[keyword] //검색어 $this->bbsBuffer[field] //검색 필드 $this->bbsBuffer[searchTerm] //검색 기간 $this->bbsBuffer[viewMode] //전체, 오늘보기 모드 $this->bbsBuffer[memberID] //회원아이디 $this->bbsBuffer[memberName] //회원이름 $this->bbsBuffer[memberNickName] //회원별명 $this->bbsBuffer[memberEmail] //회원메일주소 $this->bbsBuffer[cookieName] //쿠키 이름 $this->bbsBuffer[userName] //이름 $this->bbsBuffer[userNickName] //별명 $this->bbsBuffer[userID] //회원아이디 $this->bbsBuffer[userEmail] //메일주소 $this->bbsBuffer[userHomepage] //홈페이지 주소 $this->bbsBuffer[subject] //제목 $this->bbsBuffer[rDate] //등록일 $this->bbsBuffer[view] //조회수 $this->bbsBuffer[vote] //추천수 $this->bbsBuffer[down] //다운로드 횟수 $this->bbsBuffer[file] //업로드 파일 $this->bbsBuffer[image] //업로드 이미지 $this->bbsBuffer[content] //글내용 $this->bbsBuffer[buttonList] //리스트버튼 $this->bbsBuffer[buttonWrite] //쓰기버튼 $this->bbsBuffer[buttonReply] //답장버튼 $this->bbsBuffer[buttonModify] //수정버튼 $this->bbsBuffer[buttonDelete] //삭제버튼 $this->bbsBuffer[buttonVote] //투표버튼 $this->bbsBuffer[buttonPrintView] //프린트버튼 $this->bbsBuffer[prevListView] //이전글 $this->bbsBuffer[nextListView] //다음글 $this->bbsBuffer[threadTotal] //관련글수 $this->bbsBuffer[sortField] //정렬필드 $this->bbsBuffer[sortOption] //정렬옵션 $this->bbsBuffer[cateTemplate] //카테고리 템플릿 $this->bbsBuffer[opinionMode] //코멘트 등록, 수정, 삭제 모드값. $this->bbsBuffer[opinionID] //코멘트 글 고유번호 $this->bbsBuffer[opinionName] //코멘트 등록 이름 $this->bbsBuffer[opinionUserID] //코멘트 등록 아이디 $this->bbsBuffer[opinionNickName] //코멘트 등록 별명 $this->bbsBuffer[opinionContent] //코멘트 내용 $this->bbsBuffer[emoticon] //코멘트 아이콘 선택 //[답변글에 대한 변수] 아래의 변수는 배열로 저장된것으로서 각 게시룸 리스트에대한 정보이다. $this->listBuffer[$i][style] //행의 스타일정보 $this->listBuffer[$i][number] //글등록 번호 $this->listBuffer[$i][categoryName] //카테고리 이름 $this->listBuffer[$i][subject] //제목 $this->listBuffer[$i][userID] //아이디 $this->listBuffer[$i][userName] //이름 $this->listBuffer[$i][userNickName] //별명 $this->listBuffer[$i][userEmail] //메일주소 $this->listBuffer[$i][view] //조회수 $this->listBuffer[$i][down] //다운로드 횟수 $this->listBuffer[$i][opinionCount] //코멘트 글수 $this->listBuffer[$i][newImage] //새로운글 이미지 $this->listBuffer[$i][download] //다운로드 링크 $this->listBuffer[$i][vote] //추천수 $this->listBuffer[$i][rDate] //등록일자 //[코멘트 내용] 코멘트의 글들에 대한 내용이 배열로 저장되어 있다. $this->opinionBuffer[$i][id] //코멘트 글 고유번호 $this->opinionBuffer[$i][userID] //회원 아이디 $this->opinionBuffer[$i][userName] //회원 이름 $this->opinionBuffer[$i][userNickName] //회원 별명 $this->opinionBuffer[$i][emoticon] //이모티콘 이름 $this->opinionBuffer[$i][rDate] //등록일 $this->opinionBuffer[$i][content] //내용 $this->opinionBuffer[$i][buttonModify] //수정버튼 $this->opinionBuffer[$i][buttonDelete] //삭제버튼 */ ?> <SCRIPT language=javascript src="include/javascriptBBS.js"></SCRIPT> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td><?= $this->bbsBuffer[buttonList] ?> <?= $this->bbsBuffer[buttonVote] ?> <?= $this->bbsBuffer[buttonWrite] ?> <?= $this->bbsBuffer[buttonReply] ?> <?= $this->bbsBuffer[buttonModify] ?> <?= $this->bbsBuffer[buttonDelete] ?> <?= $this->bbsBuffer[buttonPrintView] ?></td> <td align=right>[ 조회 : <?= $this->bbsBuffer[view] ?> / 추천 : <?= $this->bbsBuffer[vote] ?> ]</td> </tr> </table> </td> </tr> <tr> <td> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td background="/images/dotBig.gif" height=1></td> </tr> <tr> <td height=30 bgcolor=#EEEEEE colspan=3> <table border=0 cellpadding=3 cellspacing=0 width=100%> <tr> <td width=40><img src="/images/iconTitleBig.gif" width=34 height=34 align=absmiddle></td> <td class=bigBlue> <b><?= $this->bbsBuffer[subject] ?></b> </td> <td width=140 align=right class=smallTitle> [<?= date("Y/m/d H:i:s", $this->bbsBuffer[rDate]) ?>]&nbsp;&nbsp; </td> </tr> </table> </td> </tr> <tr> <td background="/images/dotBig.gif" height=1></td> </tr> <? if($this->bbsBuffer[userHomepage] != "") { ?> <tr> <td class=darkgray height=30>홈페이지 : <?= $this->bbsBuffer[userHomepage] ?></td> </tr> <tr> <td background="/images/dotBig.gif" height=1></td> </tr> <? } if($this->bbsBuffer[file] != "") { ?> <tr> <td class=darkgray height=30>첨부파일 : <?= $this->bbsBuffer[file] ?></td> </tr> <tr> <td background="/images/dotBig.gif" height=1></td> </tr> <? } if($this->bbsBuffer[image] != "") { ?> <tr> <td height=15></td> </tr> <tr> <td align=center><?= $this->bbsBuffer[image] ?></td> </tr> <tr> <td height=15></td> </tr> <? } ?> <tr> <td valign=top> <br> <?= $this->bbsBuffer[content] ?> <br><br> </td> </tr> <tr> <td height=20></td> </tr> <tr> <td class=darkgray><?= $this->bbsBuffer[prevListView] ?></td> </tr> <tr> <td class=darkgray><?= $this->bbsBuffer[nextListView] ?></td> </tr> <tr> <td height=20></td> </tr> <tr> <td> <table border=0 cellpadding=5 cellspacing=0 width=100%> <tr> <td background="/images/dotBig.gif" height=1 colspan=2></td> </tr> <tr bgcolor=#F9F9F9> <td width=50% height=30> <img src="/images/iconTitle.gif" align=absmiddle> <?= $this->bbsBuffer[userNickName] ?>님 [ 조회 : <?= $this->bbsBuffer[view] ?> / 추천 : <?= $this->bbsBuffer[vote] ?> ] </td> <td align=right class=gray> </td> </tr> <tr> <td background="/images/dotBig.gif" height=1 colspan=2></td> </tr> </table> </td> </tr> <tr> <td height=20></td> </tr> <tr> <td> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td valign=top> <table width=100% border=0 cellpadding=0 cellspacing=1 bgcolor=#BBBBBB> <tr> <td bgcolor=#FFFFFF> <a name="opinionView"></a> <table width=100% border=0 cellpadding=5 cellspacing=0> <tr bgcolor=#EEEEEE> <td colspan=2> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td width=70%> <img src="/images/iconTitle3.gif" align=absmiddle> <B>짧은 글 등록하기</B> </td> <td align=right> </td> </tr> </table> </td> </tr> <tr> <td colspan=2 background="/images/bg_dot.gif" height=1></td> </tr> <tr> <td colspan=2align=center> <table border=0 cellpadding=5 cellspacing=0 width=100%> <form method=post name='opinionForm' action='bbsProcess.php' onsubmit="return opinionFormCheck(this, 'member');"> <input type=hidden name='bbsMode' value="opinionProcess"> <input type=hidden name='bbsOpinionMode' value="<?= $this->bbsBuffer[opinionMode] ?>"> <input type=hidden name='opinionID' value="<?= $this->bbsBuffer[opinionID] ?>"> <input type=hidden name='code' value="<?= $this->bbsBuffer[code] ?>"> <input type=hidden name='bbs_id' value="<?= $this->bbsBuffer[bbs_id] ?>"> <input type=hidden name='id' value="<?= $this->bbsBuffer[id] ?>"> <input type=hidden name='page' value="<?= $this->bbsBuffer[page] ?>"> <input type=hidden name='keyword' value="<?= $this->bbsBuffer[keyword] ?>"> <input type=hidden name='field' value="<?= $this->bbsBuffer[field] ?>"> <input type=hidden name='searchTerm' value="<?= $this->bbsBuffer[searchTerm] ?>"> <input type=hidden name='viewMode' value="<?= $this->bbsBuffer[viewMode] ?>"> <input type=hidden name='emoticon' value="<?= $this->bbsBuffer[emoticon] ?>"> <input type=hidden name="sortField" value="<?= $this->bbsBuffer[sortField] ?>"> <input type=hidden name="sortOption" value="<?= $this->bbsBuffer[sortOption] ?>"> <input type=hidden name="cateTemplate" value="<?= $this->bbsBuffer[cateTemplate] ?>"> <tr> <td colspan=2> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td width=50> <table border=0 cellpadding=0 cellspacing=1 width=40 height=40 bgcolor=#999999> <tr> <td bgcolor=#FFFFFF align=center> <div id=emoticonImage><img src="/images/msnImages/<?= $this->bbsBuffer[emoticon] ?>.gif" align="absmiddle" onMouseOver="MM_showHideLayers('emoticonLayer','','show');emoticonLayer.style.pixelLeft = window.event.x + document.body.scrollLeft;emoticonLayer.style.pixelTop = window.event.y + document.body.scrollTop + 1;" style='cursor:hand'></div> </td> </tr> </table> </td> <td>회원아이디 : <B><?= $this->bbsBuffer[opinionUserID] ?></B></td> </tr> </table> </td> </tr> <tr> <td> <textarea name='opinionContent' class=textarea style='width=100%; height=60'><?= $this->bbsBuffer[opinionContent] ?></textarea> </td> <td width=6%> <input type=submit value='확인' class='input' style='height=28;width=70'> <p style='margin-top:4'> <input type=button value="돌아가기" class='input' onClick="history.back();" style='height=28;width=70'> </td> </tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <table width=100% border=0 cellpadding=0 cellspacing=0> <tr> <td width=3 nowrap height=4></td> <td width=100% bgcolor=#F1F1F1></td> <td width=3 nowrap></td></tr><tr><td colspan=3 height=5></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td height=20></td> </tr> <tr> <td> <table border=0 cellpadding=5 cellspacing=0 width=100%> <tr> <td height=1 colspan=3 background="/images/dotBig.gif"></td> </tr> <? if(is_array($this->opinionBuffer)) { while(list($i, $val) = each($this->opinionBuffer)) { ?> <tr bgcolor=#FFFFFF> <td width=130 class=green valign=top nowrap><img src='/images/msnImages/<?= $this->opinionBuffer[$i][emoticon] ?>.gif' align='absmiddle'> <b><?= $this->opinionBuffer[$i][userID] ?></b></td> <td valign=top><?= $this->opinionBuffer[$i][content] ?></td> <td width=90 align=right valign=top class="smallTD"><?= date("m/d H:i", $this->opinionBuffer[$i][rDate]) ?> <?= $this->opinionBuffer[$i][buttonModify] ?> <?= $this->opinionBuffer[$i][buttonDelete] ?></td> </tr> <tr> <td height=1 colspan=3 background="/images/dotBig.gif"></td> </tr> <? } } ?> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td height=30></td> </tr> <tr> <td valign=top> <table width=100% border=0 cellpadding=0 cellspacing=1 bgcolor=#BBBBBB> <tr> <td bgcolor=#FFFFFF> <table width=100% border=0 cellpadding=5 cellspacing=0> <tr> <td colspan=5> <table border=0 cellpadding=3 cellspacing=0 width=100%> <tr> <td> [ <B>관련글</B> 총 <font color=#ff0000><?= $this->bbsBuffer[threadTotal] ?></font> 건] </td> <td align=right> <table border=0 cellpadding=0 cellspacing=0> <tr> <td> <?= $this->bbsBuffer[categoryList] ?> </td> <td><?= $this->bbsBuffer[buttonList] ?> <?= $this->bbsBuffer[buttonVote] ?> <?= $this->bbsBuffer[buttonWrite] ?> <?= $this->bbsBuffer[buttonReply] ?> <?= $this->bbsBuffer[buttonModify] ?> <?= $this->bbsBuffer[buttonDelete] ?> <?= $this->bbsBuffer[buttonPrintView] ?></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td colspan=5 background="/images/bg_dot.gif" height=1></td> </tr> <tr height=25 bgcolor=#DDDDDD> <td align=center width=8%><B>번호</B></td> <td align=center><B>제목</B></td> <td align=center width=12%><B>아이디</B></td> <td align=center width=12%><B>조회수</B></td> <td align=center width=12%><B>등록일자</B></td> </tr> <tr> <td colspan=5 background="/images/bg_dot.gif" height=1></td> </tr> <? if(is_array($this->listBuffer)) { while(list($i, $val) = each($this->listBuffer)) { ?> <tr height=25 <?= $this->listBuffer[$i][style] ?>> <td align=center><?= $this->listBuffer[$i][number] ?></td> <td class=darkgray><?= $this->listBuffer[$i][subject] ?> <font size=1><?= $this->listBuffer[$i][opinionCount] ?></font> <?= $this->listBuffer[$i][newImage] ?></td> <td align=center class=dark_gray><?= $this->listBuffer[$i][userID] ?></td> <td align=center><?= $this->listBuffer[$i][view] ?></td> <td align=center><?= date("Y/m/d", $this->listBuffer[$i][rDate]) ?></td> </tr> <tr> <td colspan=5 background="/images/bg_dot.gif" height=1></td> </tr> <? } } else { echo " <tr> <td colspan=5> 리스트가 없습니다. </td> </tr> "; } ?> </table> </td> </tr> </table> <table width=100% border=0 cellpadding=0 cellspacing=0> <tr> <td width=3 nowrap height=4></td> <td width=100% bgcolor=#F1F1F1></td> <td width=3 nowrap></td></tr><tr><td colspan=3 height=5></td> </tr> </table> </td> </tr> </table>[/code]살며 그리고 사랑하며...
정보는 공유할때 그 가치가 있는것.....
나의 조그만 지식공유는 남에게 엄청난 기쁨을 안겨 준다.
Re: 답변 감사합니다. 소스 전체 입니다.
올려주신 파일이 다른 파일을 include 하는게 아니고다른 파일이
올려주신 파일이 다른 파일을 include 하는게 아니고
다른 파일이 올려주신 파일을 include 하기 때문에 위의 skin 파일을
include 하는 녀석을 찾아보셔야 겠군요.