서브페이지 작업시 head.php랑 tail.php 경로설정 도움 부탁드립니다.^^ 채택완료
보통 게시판 같은경우는 관리자모드에서 head.php랑 tail.php를 불러올 수 있는데..
서브페이지를 만들 경우 불러오지 못해서 흰 화면만 보일 경우 경로를 어떻게 설정해야 할까요??
theme/basic/sub1/sub1.php
<?php
define('_INDEX_', true);
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_THEME_PATH.'/head.php');
?>
<div id="container">
<table width="970" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="900" align="left" valign="top"><img src="theme/basic/sub1/img/sub1_1.jpg" width="970" height="900"></td>
</tr>
<tr>
<td height="160" align="left" valign="top"> </td>
</tr>
<tr>
<td height="500" align="left" valign="top"> </td>
</tr>
</table>
<p> </p>
</div>
</div>
<?php
include_once(G5_THEME_PATH.'/tail.php');
?>
답변 5개
답변에 대한 댓글 3개
2. '_common.php' 파일을 열어서 경로를 수정해줍니다.
[code]include_once('../common.php');[/code]를...
[code]include_once('../../common.php');[/code]로...
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
include_once(G5_THEME_PATH.'/head.php');
여기 경로를 G5_THEME_PATH.'/head.php' 이거말고 절대경로로 지정해보세요.
../theme/basic/ head.php 이런식으로요...
답변에 대한 댓글 1개
include_once('/theme/basic/head.php'); 랑 같은 거니까 상관없을 듯 합니다.
G5_THEME_PATH는 테마에 있는 head.php를 불러오니깐요
둘 다 해봤는데 똑같습니당^^
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
지금은 bbs/sub1.php 이지만 bbs/sub1/sub1.php 로 한다면 경로를 다시 수정해야하는데 무엇을 어떻게 수정하나요??
<?php
include_once('./_common.php');
if (G5_IS_MOBILE) {
include_once(G5_MOBILE_PATH.'group.php');
return;
}
if(!$is_admin && $group['gr_device'] == 'mobile')
alert($group['gr_subject'].' 그룹은 모바일에서만 접근할 수 있습니다.');
$g5['title'] = '';
include_once(G5_THEME_PATH.'/head.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
$gr_id = '';
?>
<!-- 서브1_1 -->
<p>test1</p>
<?php
include_once(G5_THEME_PATH.'/tail.php');
?>