extend 폴더에 최신글 관련 파일 질문 드립니다. > 그누4 질문답변

그누4 질문답변

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

extend 폴더에 최신글 관련 파일 질문 드립니다. 정보

extend 폴더에 최신글 관련 파일 질문 드립니다.

본문

bbs/extend 에 최신글 관련 파일이 다른것이 2가지가 있으면

오류가 나는데요(한개만 사용가능한건가요?) , 오류가 안나게 하려면 어떻게 해주어야 하나요 ?

latest_1.lib.php

latest_2.lib.php

최근게시물 뽑기
http://www.sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=8713

댓글 전체

오류내용 입니다.
Warning: Cannot modify header information - headers already sent by (output started at /home2/zonehom/public_html/bbs/extend/latest_2.lib.php:42) in /home2/zonehom/public_html/bbs/head.sub.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home2/zonehom/public_html/bbs/extend/latest_2.lib.php:42) in /home2/zonehom/public_html/bbs/head.sub.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /home2/zonehom/public_html/bbs/extend/latest_2.lib.php:42) in /home2/zonehom/public_html/bbs/head.sub.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home2/zonehom/public_html/bbs/extend/latest_2.lib.php:42) in /home2/zonehom/public_html/bbs/head.sub.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home2/zonehom/public_html/bbs/extend/latest_2.lib.php:42) in /home2/zonehom/public_html/bbs/head.sub.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home2/zonehom/public_html/bbs/extend/latest_2.lib.php:42) in /home2/zonehom/public_html/bbs/head.sub.php on line 38
최근게시물 뽑기
http://www.sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=8713 

위에것 하나와 아래것 해서 두개 사용할려고 하는데요 두개를 업하고 나니 오류가 납니다.


<?
if (!defined('_GNUBOARD_')) exit;

function latest_s($skin_dir="", $bo_table, $rows=10, $subject_len=40, $brch="")
{
    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;
    if ($brch == "H")
    $brch = "wr_hit";
elseif ($brch == "C")
    $brch ="wr_comment";
elseif ($brch == "R")
    $brch = "rand()";
elseif ($brch == "G")
    $brch = "wr_good";
else
    $brch = "wr_id";

    $sql = " select * from $tmp_write_table where wr_is_comment = 0 order by $brch desc 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;
}
?>
헤더는 한번 보내고 나면 수정할 수 없습니다. 또한 헤더를 보내기 이전에 어떠한 값이 출력되면 오류가 납니다. 이런 문제를 해결하기 위해 쓰는 것이 ob_start(); 이것인데, 이를 중복사용하면 오류가 발생할수 있습니다.
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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