미

도와주세요 -.-

/www 밑에 ceo.php란 파일이 있으면 정상적으로 페이지가 보이는데..
[ceo.php]
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");

$g4['title'] = "";
include_once("./_head.php");
?>
..................


/www/eng/introduction 밑에 ceo.php 라는 파일을 두면 에러가 떠요.
[ceo.php]
<?
include_once("../../_common.php");
include_once("../../$g4[path]/lib/latest.lib.php");

$g4['title'] = "";
include_once("../../_head.php");
?>
<script src="../../Scripts/swfobject_modified.js" type="text/javascript"></script>
.............


************** 에러 메세지 ************

Warning: include_once(/_common.php) [function.include-once]: failed to open stream: No such file or directory in /home/hosting_users/mizella/www/eng/introduction/ceo.html on line 2

Warning: include_once() [function.include]: Failed opening '/_common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/mizella/www/eng/introduction/ceo.html on line 2

Warning: include_once(/lib/latest.lib.php) [function.include-once]: failed to open stream: No such file or directory in /home/hosting_users/mizella/www/eng/introduction/ceo.html on line 3

Warning: include_once() [function.include]: Failed opening '/lib/latest.lib.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/mizella/www/eng/introduction/ceo.html on line 3

첨부파일

ceo.html (6 KB) 2회 2010-07-06 16:48

댓글 1개

경로 추적이 잘못되었구요,,
/_common.php 파일을 조금 수정하세요

$g4_path = $g4_path == "" ? "." : $g4_path; // common.php 의 상대 경로
include_once("$g4_path/common.php");

------------------------------------------------------------------

$g4_path = "../..";
include_once($g4_path."/_common.php");
include_once($g4[path]."/lib/latest.lib.php");

저의 경우 이렇습니다.

나머지는 모든 최상위 경로에서부터 파일명을 적어주시고 include_once 하는게 좋습니다.
속편합니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
10-07-07 조회 1,849
10-07-07 조회 1,745
10-07-07 조회 1,705
10-07-07 조회 1,641
10-07-06 조회 1,638
10-07-06 조회 1,103
10-07-06 조회 1,793
10-07-06 조회 1,858
10-07-06 조회 1,007
10-07-06 조회 1,092
10-07-06 조회 1,449
10-07-06 조회 1,626
10-07-06 조회 1,963
10-07-06 조회 1,222
10-07-06 조회 1,120
10-07-06 조회 1,445
10-07-06 조회 1,686
10-07-06 조회 1,631
10-07-05 조회 1,650
10-07-05 조회 1,550