게시판 인클루드 질문입니다.

· 2013-04-10 (수) 14:30:13 · 1648 · 6
게시판에 상, 하단 경로를 넣는데요~ 문제는 게시판에 좌측메뉴까지 있습니다.

그래서 별도의 head2.php (상단과 좌측) 파일을 만들었고요

오른쪽으로 필요한 게시판이 들어오게되고

하단에는 tail.php가 들어가야하는 상황일때

head2.php 소스를 어떻게 변경해야하나요?


head2.php소스입니다.---------------



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

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

<?

include_once("./head.php");


?>

<?

include_once("./sub_top.php");


?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td align="center">

<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="235" align="left">
<div style="height:5px"></div>
<div id="Container">
<div class="position_l">
<? include_once("./side6.htm"); ?>
</div>
</div>
</td>
<td>



요 상단메뉴는 나오는데
include_once("./head.php");

그다음 서브상단이미지
include_once("./sub_top.php");
이거랑

좌측(side6.htm) 인클루드는 나오지 않고
게시판만 오른쪽으로 보입니다.

게시판 하단에 걸어놓은 tail.php 도 하단에 보이지 않습니다.

어떻게 입력해주어야 할까요?
|

댓글 6개

우선 경로문제.

$g4[path] 는 항상 루트를 의미하지만
상대경로인 ./ 는 게시판 보기에서는 ./bbs/경로가 됩니다.
index 에서는 루트고요. 호출하는 파일이 존재하는 위치가 ./가 되는거죠.
그러므로 경로는 되도록 $g4[path] 로 시작하는 형식으로 써주셔야 오류발생을 줄일 수 있습니다.

루트에 sub_top.php 이 존재한다면
<? include_once("$g4[path]/sub_top.php"); ?>
처럼 써주시면 되겠죠..
2013-04-10 (수) 15:42:40
$g4[path] 붙여주니까 제대로 나오네요 >< 감사합니다~~
2013-04-10 (수) 16:27:01
저근데 혹시 하단은 어케들어가야 출력이되나요? 맨위랑 좌측까지 다나오는데
하단은 안나옵니다..ㅠㅠ


하단소스는 tail2.php-----------


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 사용자 화면 우측과 하단을 담당하는 페이지입니다.
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>
<style type="text/css">
#wrap { width:100%;height:20px; position:relative}
#apDiv1 { position:absolute; right:100px; top:120px;width:140px; height:0px; z-index:1; text-align:center; }

</style>

<div style="width:100%" align="center">
<div style="width:1000;" align="left">
<div id="footer" style="background:url(<?=$g4[path]?>/img/tail.gif); background-repeat:no-repeat; height:143">

<div id="wrap">
<div id="apDiv1" style="position:absolute; left:830px; top:126px;">
<div class="bottom">
<? if($is_member) { ?>
<a href="<?=$g4[path]?>/adm/index.php">관리자모드</a>
<a href="<?=$cm->link['logout']?>">로그아웃</a>
<? } else { ?>
<a href="<?=$g4[path]?>/bbs/login.php">로그인</a>
<? } ?>

</div>
</div>
</div>
</div>
</div>
</div>
<?
include_once("$g4[path]/tail.sub.php");
?>
2013-04-10 (수) 14:44:49
일단 경로부분이 문제가 있는듯 한데요 head.php 랑 sub_top.php가 동일 디렉토리에 있는거 맞나요?
2013-04-10 (수) 16:28:18
네//경로는 같은곳에 있습니다.
파일을 못불러들인듯 합니다만.. <? include_once("../side6.htm"); ?> 형식으로 해보세요...
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-04-11 조회 1,718
13-04-10 조회 1,105
13-04-10 조회 1,708
13-04-10 조회 1,775
13-04-10 조회 1,123
13-04-10 조회 1,731
13-04-10 조회 3,699
13-04-10 조회 1,991
13-04-10 조회 922
13-04-10 조회 3,896
13-04-10 조회 1,941
13-04-10 조회 1,936
13-04-10 조회 1,096
13-04-10 조회 836
13-04-10 조회 1,056
13-04-10 조회 1,062
13-04-10 조회 1,649
13-04-10 조회 4,047
13-04-10 조회 1,786
13-04-10 조회 1,875