말풍선 최신글을 사용하려면...
본문
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=152482&page=3
http://internationale.kr/index_example_4.php
이리저리 수정해봐도 글이 뜨지 않네요.
'talkopen.php' 단독 테이블과 전체 게시글 둘 다 사용해봤습니다.
아래는 단독 테이블 소스입니다.
<?
$_gnu_url = "";
$g5_path = '..';
include_once(G5_PATH.'/common.php');
$turl = "http://internationale.kr/bbs/board.php?bo_table=free&me_code=1020";
$bo_table = 'free';
$lines = 15;
$comment ="진정한 말풍선";
// 특수문자 변환
function specialchars_replace($str, $len=0) {
if ($len) {
$str = substr($str, 0, $len);
}
$str = preg_replace("/&/", "&", $str);
$str = preg_replace("/</", "<", $str);
$str = preg_replace("/>/", ">", $str);
return $str;
}
$sql = " select gr_id, bo_subject, bo_page_rows, bo_read_level, bo_use_rss_view from $g5[board_table] where bo_table = '$bo_table' ";
$row = sql_fetch($sql);
Header("Content-type: text/xml");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
$sql = " select gr_subject from $g5[group_table] where gr_id = '$row[gr_id]' ";
$row = sql_fetch($sql);
$subj1 = specialchars_replace($row[gr_subject], 255);
echo "<?xml version=\"1.0\" encoding=\"$g5[charset]\"?>\n";
echo "<bbs>\n";
$sql = " select wr_id, wr_subject, wr_content, wr_name, wr_datetime, wr_option from $g5[write_prefix]$bo_table where wr_is_comment = 0 and wr_option not like '%secret%'order by wr_num, wr_reply limit 0, $lines ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$date = $row[wr_datetime];
echo "<list turl=\"$turl\">\n";
echo "<dd>".specialchars_replace($row[wr_name])."</dd>\n";
echo "<ct>$date</ct>\n";
echo "<tt>".specialchars_replace($row[wr_subject])."</tt>\n";
echo "<uu>".specialchars_replace("$g5[url]/$g5[bbs]/board.php?bo_table=$bo_table&wr_id=$row[wr_id]")."</uu>\n";
echo "</list>\n";
}
echo "</bbs>\n";
?>
http://internationale.kr/swf/talkopen.php
이렇게 직접 주소를 넣어보면 불러온 최근글 소스들이 보여야 할텐데... 오류 메시지가 뜹니다.
line 4 : include_once(G5_PATH.'/common.php');
line 24 : $row = sql_fetch($sql);
!-->답변 1
우선은..
//include_once(G5_PATH.'/common.php');
include_once('../common.php');
이렇게 하셔야겠는데요.
아직 G5_PATH가 선언이 안된 상태라서 상수변수로 쓰인게 아니라 문자열로 인식되버렸습니다.
해서 'G5_PATH/common.php' 이 파일을 인클루드 한거죠. 그러니 파일이 없다고 에러가 나는군요.
답변을 작성하시기 전에 로그인 해주세요.