2

최신리스트를 표시할때 폴더가 다른경우...

include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
echo latest("", "notice", 3, 23);

위에 코드를 이용해서

메인 index.php파일에 게시판의 최신글을 표시하려고합니다.

그런데..게시판이 설치된폴더는 public_html/board이고
index.php과 있는 폴더는 public_html/main/index.php 입니다.

그래서 index.php 파일을 다음과 같이 수정했습니다.


<?
include_once("$_SERVER[DOCUMENT_ROOT]/board/_common.php");
include_once("$_SERVER[DOCUMENT_ROOT]/board/lib/latest.lib.php");
echo latest("", "notice", 3, 23);
?>

그렇게 했더니..


Warning: include_once(./common.php) [function.include-once]: failed to open stream: No such file or directory in /home/hoho/public_html/board/_common.php on line 3

Warning: include_once() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/lib/php/pear') in /home/hoho/public_html/board/_common.php on line 3


이런 에러가 납니다. 어떻게 수정을 해야 제대로 돌아갈까요?
|

댓글 1개

인클루드는 맨 위 방법대로 하고
_common.php를 main폴더에 복사해 넣으세요
그리고 _common.php를 수정
$g4_path="../board";
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
13년 전 조회 3,230
13년 전 조회 570
13년 전 조회 743
13년 전 조회 1,055
13년 전 조회 722
13년 전 조회 541
13년 전 조회 1,175
13년 전 조회 811
13년 전 조회 727
13년 전 조회 792
13년 전 조회 807
13년 전 조회 775
13년 전 조회 1,562
13년 전 조회 2,307
13년 전 조회 779
13년 전 조회 1,039
13년 전 조회 1,123
13년 전 조회 570
13년 전 조회 1,541
13년 전 조회 984