초초보 질문드립니다(페이지 구성관련) 정보
초초보 질문드립니다(페이지 구성관련)본문
www루트에 그누보드4를 설치하고 첫화면 구성은 완료했습니다.
그리고 서브페이지를 만들어서 일단 메인플래시메뉴버튼 1번에만 링크를 걸고
실행해보면 다음과 같은 에러가 뜹니다
g4_path변수가 선언되지 않았습니다
Warning: main(./_head1.php): failed to open stream: No such file or directory in /home/hosting_users/icoms/www/index_sub1.php on line 5
Warning: main(): Failed opening './_head1.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/icoms/www/index_sub1.php on line 5
하여 관련 질문답변을 찾아보았지만 초보자라
당췌 무슨말인지 이해가 안됩니다.
제가한 방법은 head1.php, index_sub1.php, 두화일을 내용만 틀리게 만들어서 루트에 복사해두고
플래시메뉴1에 링크를 index_sub1.php로 걸었습니다.
//head1.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = 1024;
?>
<!-- 상단 배경 시작 -->
<!-- 상단 로고 및 버튼 시작 -->
<center>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="169" height="150" rowspan="2"><script src="<?=$g4['path']?>/js/top_logo.js" width="169" height="150"></script></td>
<td width="855" height="66" align="right" valign="top" background="<?=$g4['path']?>/edo/main_02.jpg">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- 처음으로 버튼 -->
<td width="60"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/top_m01.jpg" width="60" height="20" border="0"></a></td>
<? if (!$member['mb_id']) { ?>
<!-- 로그인 이전 -->
<td width="60"><a href="<?=$g4['bbs_path']?>/login.php?url=<?=$urlencode?>"><img src="<?=$g4['path']?>/img/top_m02.jpg" width="60" height="20" border="0"></a></td>
<td width="60"><a href="<?=$g4['bbs_path']?>/register.php"><img src="<?=$g4['path']?>/img/top_m03.jpg" width="60" height="20" border="0"></a></td>
<? } else { ?>
<!-- 로그인 이후 -->
<td width="60"><a href="<?=$g4['bbs_path']?>/logout.php"><img src="<?=$g4['path']?>/img/top_m04.jpg" width="60" height="20" border="0"></a></td>
<td width="60"><a href="<?=$g4['bbs_path']?>/member_confirm.php?url=register_form.php"><img src="<?=$g4['path']?>/img/top_m05.jpg" width="60" height="20" border="0"></a></td>
<? } ?>
<!-- 최근게시물 버튼 -->
<td width="60"><a href="<?=$g4['bbs_path']?>/new.php"><img src="<?=$g4['path']?>/img/top_m06.jpg" width="60" height="20" border="0"></a></td>
</td>
<td width="35"></td>
</tr>
</table>
</tr>
<tr>
<td width="855" height="84"><script src="<?=$g4['path']?>/js/main_menu.js" width="855" height="84"></script></td>
<td width="1" height="84"></td></tr>
<!-- <tr>
<td width="169" align="center" valign="top"><img src="<?=$g4['path']?>/edo/main_left_01.jpg"></td>
</tr>--> </table>
<!-- <div style=''></div>
<style type="text/css">
#middiv {
width:<?=$table_width?>px;
position:relative;
margin:0px auto;
vertical-align:top;
float:left;
}
#middiv #mleft { width:169px; float:left; padding:0 0 0 0; }
#middiv #mright { width:855px; float:left; padding:0 0 0 0; }
</style>-->
<table width="<?=$table_width?>" cellpadding=0 cellspacing=0 border=0>
<!--왼쪽 메뉴-->
<td width="169" align="center" valign="top">
<?=outlogin("red"); // 외부 로그인 ?>
<? include_once("$g4[path]/php/left_sub1.php"); ?>
</td>
<td width="855" valign="top">
//index_sub1.php
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head1.php");
?>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<!-- <?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 12, 70);
echo "<p>\n";
}
?> -->
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./_tail.php");
?>
기초적인 지식이 없는 관계로 쉬운설명좀 부탁드립니다
그리고 서브페이지를 만들어서 일단 메인플래시메뉴버튼 1번에만 링크를 걸고
실행해보면 다음과 같은 에러가 뜹니다
g4_path변수가 선언되지 않았습니다
Warning: main(./_head1.php): failed to open stream: No such file or directory in /home/hosting_users/icoms/www/index_sub1.php on line 5
Warning: main(): Failed opening './_head1.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/icoms/www/index_sub1.php on line 5
하여 관련 질문답변을 찾아보았지만 초보자라
당췌 무슨말인지 이해가 안됩니다.
제가한 방법은 head1.php, index_sub1.php, 두화일을 내용만 틀리게 만들어서 루트에 복사해두고
플래시메뉴1에 링크를 index_sub1.php로 걸었습니다.
//head1.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = 1024;
?>
<!-- 상단 배경 시작 -->
<!-- 상단 로고 및 버튼 시작 -->
<center>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="169" height="150" rowspan="2"><script src="<?=$g4['path']?>/js/top_logo.js" width="169" height="150"></script></td>
<td width="855" height="66" align="right" valign="top" background="<?=$g4['path']?>/edo/main_02.jpg">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- 처음으로 버튼 -->
<td width="60"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/top_m01.jpg" width="60" height="20" border="0"></a></td>
<? if (!$member['mb_id']) { ?>
<!-- 로그인 이전 -->
<td width="60"><a href="<?=$g4['bbs_path']?>/login.php?url=<?=$urlencode?>"><img src="<?=$g4['path']?>/img/top_m02.jpg" width="60" height="20" border="0"></a></td>
<td width="60"><a href="<?=$g4['bbs_path']?>/register.php"><img src="<?=$g4['path']?>/img/top_m03.jpg" width="60" height="20" border="0"></a></td>
<? } else { ?>
<!-- 로그인 이후 -->
<td width="60"><a href="<?=$g4['bbs_path']?>/logout.php"><img src="<?=$g4['path']?>/img/top_m04.jpg" width="60" height="20" border="0"></a></td>
<td width="60"><a href="<?=$g4['bbs_path']?>/member_confirm.php?url=register_form.php"><img src="<?=$g4['path']?>/img/top_m05.jpg" width="60" height="20" border="0"></a></td>
<? } ?>
<!-- 최근게시물 버튼 -->
<td width="60"><a href="<?=$g4['bbs_path']?>/new.php"><img src="<?=$g4['path']?>/img/top_m06.jpg" width="60" height="20" border="0"></a></td>
</td>
<td width="35"></td>
</tr>
</table>
</tr>
<tr>
<td width="855" height="84"><script src="<?=$g4['path']?>/js/main_menu.js" width="855" height="84"></script></td>
<td width="1" height="84"></td></tr>
<!-- <tr>
<td width="169" align="center" valign="top"><img src="<?=$g4['path']?>/edo/main_left_01.jpg"></td>
</tr>--> </table>
<!-- <div style=''></div>
<style type="text/css">
#middiv {
width:<?=$table_width?>px;
position:relative;
margin:0px auto;
vertical-align:top;
float:left;
}
#middiv #mleft { width:169px; float:left; padding:0 0 0 0; }
#middiv #mright { width:855px; float:left; padding:0 0 0 0; }
</style>-->
<table width="<?=$table_width?>" cellpadding=0 cellspacing=0 border=0>
<!--왼쪽 메뉴-->
<td width="169" align="center" valign="top">
<?=outlogin("red"); // 외부 로그인 ?>
<? include_once("$g4[path]/php/left_sub1.php"); ?>
</td>
<td width="855" valign="top">
//index_sub1.php
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head1.php");
?>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<!-- <?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 12, 70);
echo "<p>\n";
}
?> -->
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./_tail.php");
?>
기초적인 지식이 없는 관계로 쉬운설명좀 부탁드립니다
댓글 전체


index.php
<?
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
// 기타 lib 파일은 여기서부터 인클루드. head.sub.php 위로 올라갔다간 오류!
?>
내용
<?
include_once("$g4[path]/tail.sub.php");
?>
<?
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
// 기타 lib 파일은 여기서부터 인클루드. head.sub.php 위로 올라갔다간 오류!
?>
내용
<?
include_once("$g4[path]/tail.sub.php");
?>
아원님 답변감사드립니다.
글찬아두 질문올리기전에 위링크를 방문하여 수차례 읽어보았는데
제가 좀 무식한지라 ㅎㅎ 밥상만 차려줘도 떠먹지를 못하는 처지랍니다 ㅜ.ㅜ
떠먹여줘야 겨우받아먹을 정도랍니다 ㅎㅎㅎ
일단 각페이지를 만들때 인덱스페이지에 따로만든head랑 tail을 인크르트시켜서
각메뉴버튼에 인덱스 페이지이름으로 링크를 걸어주는건 맞나요?
글찬아두 질문올리기전에 위링크를 방문하여 수차례 읽어보았는데
제가 좀 무식한지라 ㅎㅎ 밥상만 차려줘도 떠먹지를 못하는 처지랍니다 ㅜ.ㅜ
떠먹여줘야 겨우받아먹을 정도랍니다 ㅎㅎㅎ
일단 각페이지를 만들때 인덱스페이지에 따로만든head랑 tail을 인크르트시켜서
각메뉴버튼에 인덱스 페이지이름으로 링크를 걸어주는건 맞나요?
해결했습니다 바쁘실텐데 답변주셔서
진심으로 감사드립니다 복잡하던 머리가 이제좀 정리가 되네요
진심으로 감사드립니다 복잡하던 머리가 이제좀 정리가 되네요