최신글 추출 ㅠ 머가문제일까 잘 따라적용했는데,,

aa.gif
안녕하세요 초보 코더인데요.
이 오류는.....머가문제일까요?ㅠ

첨부파일

aa.gif (122.1 KB)
0회 2013-05-10 11:11
|

댓글 9개

/lib/latest.lib.php파일을 불러오지 않아서 나는 오류입니다
그누보드의 index.php 파일을 보시면
include_once("$g4[path]/lib/latest.lib.php"); 이런식으로 파일을 불러왔을겁니다
이파일이 있어야 latest()함수 사용이 가능하겠지요
그누보드에 기본으로 lib/latest.lib.php파일을 파일이 있는데요,,
불량학생님이 말씀하신 뜻은 저 파일이 없을 경우를 말하는 건가요??
최신글 불려올 파일 최상위에
index.php 파일일 경우~
[code]
<? include_once("$g4[path]/lib/latest.lib.php"); ?>
[/code]
이 문구가 없다는 말이죠 ;;
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");

$g4['title'] = "";
include_once("./_head.php");
?>

인덱스에 설정되어 있는걸요 ㅠㅠ
iframe 사용하시나요?
아니요...ㅠ
프레임 사용하지 않는데 undefined가 뜬다구요?
설마 /lib/latest.lib.php 파일이 빈파일은 아니겠죠?
<?
if (!defined('_GNUBOARD_')) exit;

// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";

$list = array();

$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);

$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();

return $content;
}
?>


이렇게 버젓이 있네요...정말 답답 ㅠㅠ 머가문젠지..ㅠㅠ
<? echo latest("스킨명", "게시판명" 게시물리스트수, 게시물글씨수); ?>
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
12년 전 조회 2,131
12년 전 조회 1,387
12년 전 조회 964
12년 전 조회 1,689
12년 전 조회 1,269
12년 전 조회 1,006
12년 전 조회 1,521
12년 전 조회 999
12년 전 조회 3,363
12년 전 조회 1,071
12년 전 조회 1,654
12년 전 조회 967
12년 전 조회 794
12년 전 조회 772
12년 전 조회 982
12년 전 조회 1,804
12년 전 조회 1,550
12년 전 조회 1,267
12년 전 조회 2,412
12년 전 조회 1,137
🐛 버그신고