최신글 추출 ㅠ 머가문제일까 잘 따라적용했는데,, 정보
최신글 추출 ㅠ 머가문제일까 잘 따라적용했는데,,본문
댓글 전체
/lib/latest.lib.php파일을 불러오지 않아서 나는 오류입니다
그누보드의 index.php 파일을 보시면
include_once("$g4[path]/lib/latest.lib.php"); 이런식으로 파일을 불러왔을겁니다
이파일이 있어야 latest()함수 사용이 가능하겠지요
그누보드의 index.php 파일을 보시면
include_once("$g4[path]/lib/latest.lib.php"); 이런식으로 파일을 불러왔을겁니다
이파일이 있어야 latest()함수 사용이 가능하겠지요
그누보드에 기본으로 lib/latest.lib.php파일을 파일이 있는데요,,
불량학생님이 말씀하신 뜻은 저 파일이 없을 경우를 말하는 건가요??
불량학생님이 말씀하신 뜻은 저 파일이 없을 경우를 말하는 건가요??
최신글 불려올 파일 최상위에
index.php 파일일 경우~
이 문구가 없다는 말이죠 ;;
index.php 파일일 경우~
<? include_once("$g4[path]/lib/latest.lib.php"); ?>
이 문구가 없다는 말이죠 ;;
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.php");
?>
인덱스에 설정되어 있는걸요 ㅠㅠ
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.php");
?>
인덱스에 설정되어 있는걸요 ㅠㅠ
iframe 사용하시나요?
아니요...ㅠ
프레임 사용하지 않는데 undefined가 뜬다구요?
설마 /lib/latest.lib.php 파일이 빈파일은 아니겠죠?
설마 /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;
}
?>
이렇게 버젓이 있네요...정말 답답 ㅠㅠ 머가문젠지..ㅠㅠ
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("스킨명", "게시판명" 게시물리스트수, 게시물글씨수); ?>