m

그누보드 하위디렉에서 그누보드의 헤드를 불러오고 싶습니다.

그누보드/sub/

이런 구조에서 sub 에 있는 templet_top.php 화일에
그누보드에 있는 head_sub.php 화일을 인클루드하고 싶습니다.

sub 에 있는 templet_top.php 화일에 <? include_once "$g4[path]/head.php"; ?> 했더니
아래와 같은 에러메세지가 뜹니다.
----------------------
Warning: main(/head.php) [function.main]: failed to open stream: No such file or directory in /home/~~~~~/www/sub/templet_top.php on line 1

Warning: main() [function.include]: Failed opening '/head.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/~~~~~/www/sub/templet_top.php on line 1
-----------------------

어떻게 해야하는지 고수님들의 조언을 기다립니다.

댓글 3개

$g4_path = '..';

include $g4_path.'/common.php';
include $g4['path'].'/head.sub.php';

이렇게 하시면 됩니다.
$g4_path = '..';

include $g4_path.'/common.php';
include $g4['path'].'/head.sub.php';
------------------

인클루드는 됬지만
아직도 아래와 같은 문구가 뜹니다.

-----------------
Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /home/~~~~~/www/_common.php on line 3

Warning: main() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/~~~~~/www/_common.php on line 3
해드의 문제였어요.
해드에서 include include_once("_common.php"); 삭제하니 됩니다.
감사드립니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
12-01-14 조회 1,138
12-01-14 조회 1,654
12-01-14 조회 1,131
12-01-14 조회 913
12-01-14 조회 1,086
12-01-14 조회 1,161
12-01-14 조회 2,677
12-01-14 조회 1,696
12-01-14 조회 1,751
12-01-14 조회 979
12-01-14 조회 2,339
12-01-13 조회 4,848
12-01-13 조회 1,104
12-01-13 조회 1,107
12-01-13 조회 906
12-01-13 조회 1,676
12-01-13 조회 1,194
12-01-13 조회 1,137
12-01-13 조회 1,654
12-01-13 조회 1,770