디렉토리 경로와 관련하여 질문요~ 정보
디렉토리 경로와 관련하여 질문요~관련링크
http://silsangsa.or.kr/guide/
298회 연결
본문
안녕하세요.
잘 안되는 부분이 있어서 도움을 청합니다.
제가 php의 기본을 아는건 아니구요.
순전히 이곳 질문과답변 등을 참고삼아 배우고 있습니다...
G4를 www/ 아래에 바로 깔았습니다.
/www/ 아래에 head.php, index.php, tail.php, common.php 등의 파일들이 있습니다.
궁금한것이요..
/www/guide/ 라는 디렉토리를 만들고, 그 안에 아래와 같은 index.php 파일을 업로드했는데요.
계속 에러가 발생하네요.
예전 그누3 쓸때는 쉽게 했던거 같은데..
G4는 아직 익숙치 않아서인지.. 검색을 다 해봤는데... 잘 이해되지가 않구요.
고수님들의 조언을 기다립니다.
아~~ 무엇이 문제일까요?
-------------------------------------- index.php 파일 -------------------------------------------
<?
define("_GNUBOARD_", TRUE);
$g4_path = "../";
include_once("$g4_path/common.php");
include_once("$g4_[path]/lib/outlogin.lib.php");
unset($g4_path);
?>
<?
include_once("../_common.php");
$g4[title] = "제목";
include_once("../_head.php");
?>
<!-- 메인화면 최신글 시작 -->
<?
// 최신글
$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(스킨, 게시판아이디, 출력라인, 글자수);
}
?>
<!-- 본문 위 이미지 -->
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td height=100 bgcolor=whitesmoke></td></tr>
<tr><td height=20></td></tr>
</table>
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td width=400 valign=top>
<!-- 본문 왼쪽 시작 -->
<table width=400 cellpadding=0 cellspacing=0 align=center>
<tr><td valign=top height=150><?=latest('basic', news, 4, 25);?></td></tr>
<tr><td valign=top height=150><?=latest('basic', press, 4, 25);?></td></tr>
<tr><td valign=top height=150><?=latest('basic', photo, 4, 25);?></td></tr>
</table>
</td>
<!-- 중간여백라인 -->
<td width=30></td>
<!-- 오른쪽 -->
<td width=340 valign=top>
<table width=340 cellpadding=0 cellspacing=0 align=center>
<tr><td valign=top height=150><?=latest('basic', news, 4, 25);?></td></tr>
<tr><td valign=top height=150><?=latest('basic', offer, 4, 25);?></td></tr>
</table>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("../_tail.php");
?>
잘 안되는 부분이 있어서 도움을 청합니다.
제가 php의 기본을 아는건 아니구요.
순전히 이곳 질문과답변 등을 참고삼아 배우고 있습니다...
G4를 www/ 아래에 바로 깔았습니다.
/www/ 아래에 head.php, index.php, tail.php, common.php 등의 파일들이 있습니다.
궁금한것이요..
/www/guide/ 라는 디렉토리를 만들고, 그 안에 아래와 같은 index.php 파일을 업로드했는데요.
계속 에러가 발생하네요.
예전 그누3 쓸때는 쉽게 했던거 같은데..
G4는 아직 익숙치 않아서인지.. 검색을 다 해봤는데... 잘 이해되지가 않구요.
고수님들의 조언을 기다립니다.
아~~ 무엇이 문제일까요?
-------------------------------------- index.php 파일 -------------------------------------------
<?
define("_GNUBOARD_", TRUE);
$g4_path = "../";
include_once("$g4_path/common.php");
include_once("$g4_[path]/lib/outlogin.lib.php");
unset($g4_path);
?>
<?
include_once("../_common.php");
$g4[title] = "제목";
include_once("../_head.php");
?>
<!-- 메인화면 최신글 시작 -->
<?
// 최신글
$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(스킨, 게시판아이디, 출력라인, 글자수);
}
?>
<!-- 본문 위 이미지 -->
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td height=100 bgcolor=whitesmoke></td></tr>
<tr><td height=20></td></tr>
</table>
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td width=400 valign=top>
<!-- 본문 왼쪽 시작 -->
<table width=400 cellpadding=0 cellspacing=0 align=center>
<tr><td valign=top height=150><?=latest('basic', news, 4, 25);?></td></tr>
<tr><td valign=top height=150><?=latest('basic', press, 4, 25);?></td></tr>
<tr><td valign=top height=150><?=latest('basic', photo, 4, 25);?></td></tr>
</table>
</td>
<!-- 중간여백라인 -->
<td width=30></td>
<!-- 오른쪽 -->
<td width=340 valign=top>
<table width=340 cellpadding=0 cellspacing=0 align=center>
<tr><td valign=top height=150><?=latest('basic', news, 4, 25);?></td></tr>
<tr><td valign=top height=150><?=latest('basic', offer, 4, 25);?></td></tr>
</table>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("../_tail.php");
?>
댓글 전체
네.. 경로는 전에 수정을 해봤구요.. 그래도 잘 안되더라구요... ^^
근데...링크해주신 내용을 보고 수정을 하니까 해결이 되었어요...
중간에 최신글 관련한 것도 에러가 생겨서 추가 질문을 하려고 했는데..
그래도 그 전에 다시한번 살펴보자 해서 .. 메인의 index.php 파일과 비교해보니
include_once("$g4[path]/lib/latest.lib.php");
이 구문을 넣어줘야 했더라구요..
잘 해결되었습니다. 바다님...감사해요~~~
최종적으로 아래와 같이 하니 되었습니다.
----------------------------- 수정한 www/guide/index.php 파일 ---------------------------------
<?
$g4_path = ".."; // 경로 필수
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "제목";
include_once("$g4[path]/_head.php");
?>
<!-- 메인화면 최신글 시작 -->
<?
// 최신글
$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(스킨, 게시판아이디, 출력라인, 글자수);
}
?>
<!-- 본문 위 이미지 -->
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td height=100 bgcolor=whitesmoke></td></tr>
<tr><td height=20></td></tr>
</table>
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td><?=latest('basic', silsangsa_news, 4, 25);?></td></tr>
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("../_tail.php");
근데...링크해주신 내용을 보고 수정을 하니까 해결이 되었어요...
중간에 최신글 관련한 것도 에러가 생겨서 추가 질문을 하려고 했는데..
그래도 그 전에 다시한번 살펴보자 해서 .. 메인의 index.php 파일과 비교해보니
include_once("$g4[path]/lib/latest.lib.php");
이 구문을 넣어줘야 했더라구요..
잘 해결되었습니다. 바다님...감사해요~~~
최종적으로 아래와 같이 하니 되었습니다.
----------------------------- 수정한 www/guide/index.php 파일 ---------------------------------
<?
$g4_path = ".."; // 경로 필수
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "제목";
include_once("$g4[path]/_head.php");
?>
<!-- 메인화면 최신글 시작 -->
<?
// 최신글
$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(스킨, 게시판아이디, 출력라인, 글자수);
}
?>
<!-- 본문 위 이미지 -->
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td height=100 bgcolor=whitesmoke></td></tr>
<tr><td height=20></td></tr>
</table>
<table width=770 cellpadding=0 cellspacing=0 align=center>
<tr><td><?=latest('basic', silsangsa_news, 4, 25);?></td></tr>
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("../_tail.php");