힐링아무

외부에서 최신글 출력하는 문제입니다.

· 19년 전 · 1516 · 7
안녕하세요. 간단히 디렉토리 구조를 보면
 
최상위/  - eun/    --> 최신글 출력
             - board/  --> 그누보드 설치
 
그누보드 설치된 디렉토리와 최신글 출력하려는 메인파일이 있는 디렉토리가 달라요.
그런경우 어떻게 출력해야 하나요? 아래처럼 해봤는데 에러만 뜨고 잘못했나봐요.
부디~ 알려주세요. ㅠ.ㅠ
 
<?
     $g4_path = "../board"; // g4 사용을 위해서 반드시 추가
     include_once("$g4[path]/common.php"); // g4 사용을 위해서 반드시 추가
     include_once("$g4[path]/lib/latest.lib.php"); // 최신글 처리를 위해서 반드시 추가
     include_once("$g4[path]/lib/latest.lib.php");
     include_once("$g4[path]/head.sub.php"); 
     include_once("$g4[path]/tail.sub.php"); 
     $g4[title] = ""; 
?>      
     
     <?=latest("basic", notice, 5, 22); ?>
|

댓글 7개

RRSS 그누보드
19년 전
외부에서 최신글 출력하는 문제입니다.
그누디렉토리에 지금처럼 하신다음 파일로 만드셔요

그런다음 그 파일을 아이프레임으로 부르시면 될건데요

행운이 있를.......
에러 내용을 보여 주시면 어떨까요?
다음과 같이 두 파일을 만드세요. eun 폴더에 넣으시고요.
/eun/_common.php

<?
$g4_path = "../board";
include_once("$g4_path/common.php");
?>





/eun/index.php

<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "타이틀";
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
?>

<?=latest("basic", notice, 5, 22); ?>

<?
include_once("$g4[path]/tail.sub.php");
?>
주의 사항은, 위 내용대로 복사하면...
<?
물음표 뒷 부분에 띄어쓰기가 없어야 합니다. 즉 스페이스바가 한칸 눌려져 있을 것입니다.
?>
유아원님 가르켜주신대로 했는데 아래같은 에러메세지가 떴어요. 어떻게 하면 될까요?

Warning: Cannot modify header information - headers already sent by (output started at /home/soej/www/eun/top.php:16) in /home/soej/www/board/lib/common.lib.php on line 109
이번엔 폴더를 바꿔봤거든요. shop이란 디렉토리 안에 그누보드(board)를 옮겨줬어요.
-- /
-- /shop-- board

이런식으로요. 그리고 유아원님께서 알려주신대로 shop 폴더안에 _common.php파일 만들어서 안에는

<?
$g4_path = "./board"; 여기서 저는 shop안에 board를 옮겼으니까 "./"로 적용했어요.
include_once("$g4_path/common.php");
?>

index.php 파일안에는~
<?
$g4_path = ".";
include_once("$g4_path/_common.php"); // g4 사용을 위해서 반드시 추가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
?>

<?=latest("basic", notice, 5, 22); ?>

이렇게 적어줬구요. 그런데 아래같은 오류가 떠요.
Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/lib/common.lib.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/head.sub.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/head.sub.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/head.sub.php on line 47

Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/head.sub.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/head.sub.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/rina/www/shop/top.php:17) in /home/rina/www/shop/board/head.sub.php on line 50


제발 어떻게 해야할지 봐주세요. ㅠ.ㅠ
아이프레임은 more 눌렀을때 처음 정해논 테이블 안에 리스트가 나와버려서 안되거든요.
어떻게 해야할까요...
위와같은 에러를 없애려면..이 팁을 참고해 보세요...^^

http://sir.co.kr/bbs/tb.php/g4_tiptech/3234
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,629
19년 전 조회 1,526
19년 전 조회 1,553
19년 전 조회 1,572
19년 전 조회 1,552
19년 전 조회 1,373
19년 전 조회 1,497
19년 전 조회 1,577
19년 전 조회 1,544
19년 전 조회 1,517
19년 전 조회 1,449
19년 전 조회 1,538
19년 전 조회 1,210
19년 전 조회 1,334
19년 전 조회 1,934
19년 전 조회 1,492
19년 전 조회 1,560
19년 전 조회 1,852
19년 전 조회 1,528
19년 전 조회 1,599
🐛 버그신고