그누보드5가 설치된 경로와 다른 경로에 그누보드 스킨을 적용하려면? 채택완료
아래의 내용에서 변수명만 $g5[path] 로 바꿔서 해봤는데 안되더군요...
php 잘 아시는 분 없나요? 몇일 전부터 여기에 묻는데 속 시원한 대답을 해주시는 분이 아무도 없네요...
------------제가 작성한 내용-----------
_common.php
<?
define('_INDEX_', true);
$g5[path]="./php"; //gnuboard5 설치경로
include_once("$g5[path]/common.php");
?>
index.html
<!doctype html>
<?
include_once("./_common.php");
include_once("$g5[path]/head.sub.php");
include_once("$g5[path]/lib/outlogin.lib.php");
include_once("$g5[path]/lib/poll.lib.php");
include_once("$g5[path]/lib/visit.lib.php");
include_once("$g5[path]/lib/connect.lib.php");
include_once("$g5[path]/lib/popular.lib.php");
include_once("$g5[path]/lib/latest.lib.php");
?>
---------------참고로 한 그누보드 4 팁 자료실 내용----------------------
1. 작성하는 경로에 _common.php 파일 작성
<?
$intra_path = "./../gnu"; // common.php 의 상대 경로
include_once("$intra_path/common.php");
?>
2. 표현하고자 하는 파일에 아래 내용 포함 후 사용
<?
include_once("./_common.php");
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");
include_once("$g4[path]/lib/latest.lib.php");
?>
참고하세요
_common.php파일 $intra_path를 $g4[path]로 변경하셔야 합니다.
수정하셔서 잘못 올리신듯
php 잘 아시는 분 없나요? 몇일 전부터 여기에 묻는데 속 시원한 대답을 해주시는 분이 아무도 없네요...
------------제가 작성한 내용-----------
_common.php
<?
define('_INDEX_', true);
$g5[path]="./php"; //gnuboard5 설치경로
include_once("$g5[path]/common.php");
?>
index.html
<!doctype html>
<?
include_once("./_common.php");
include_once("$g5[path]/head.sub.php");
include_once("$g5[path]/lib/outlogin.lib.php");
include_once("$g5[path]/lib/poll.lib.php");
include_once("$g5[path]/lib/visit.lib.php");
include_once("$g5[path]/lib/connect.lib.php");
include_once("$g5[path]/lib/popular.lib.php");
include_once("$g5[path]/lib/latest.lib.php");
?>
---------------참고로 한 그누보드 4 팁 자료실 내용----------------------
1. 작성하는 경로에 _common.php 파일 작성
<?
$intra_path = "./../gnu"; // common.php 의 상대 경로
include_once("$intra_path/common.php");
?>
2. 표현하고자 하는 파일에 아래 내용 포함 후 사용
<?
include_once("./_common.php");
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");
include_once("$g4[path]/lib/latest.lib.php");
?>
참고하세요
_common.php파일 $intra_path를 $g4[path]로 변경하셔야 합니다.
수정하셔서 잘못 올리신듯
댓글을 작성하려면 로그인이 필요합니다.
답변 3개
채택된 답변
+20 포인트
사노라가노라
12년 전
_common.php
<?php
include_once('./php/common.php');
?>
index.html
<?php
define('_INDEX_', true);
include_once('./_common.php');
$g5[path]="./php"; // gnuboard5 설치경로
include_once("$g5[path]/head.sub.php");
include_once("$g5[path]/lib/outlogin.lib.php");
include_once("$g5[path]/lib/poll.lib.php");
include_once("$g5[path]/lib/visit.lib.php");
include_once("$g5[path]/lib/connect.lib.php");
include_once("$g5[path]/lib/popular.lib.php");
include_once("$g5[path]/lib/latest.lib.php");
?>
<h2 class="sound_only">최신글</h2>
<!-- 최신글 시작 { -->
<?php
// 최신글
$sql = " select bo_table from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id) where a.bo_device <> 'mobile' order by b.gr_order, a.bo_order ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i%2==1) $lt_style = "margin-left:20px";
else $lt_style = "";
?>
<div style="float:left;<?php echo $lt_style ?>">
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 5, 25);
?>
</div>
<?php
}
?>
<!-- } 최신글 끝 -->
<?php
include_once('./php/common.php');
?>
index.html
<?php
define('_INDEX_', true);
include_once('./_common.php');
$g5[path]="./php"; // gnuboard5 설치경로
include_once("$g5[path]/head.sub.php");
include_once("$g5[path]/lib/outlogin.lib.php");
include_once("$g5[path]/lib/poll.lib.php");
include_once("$g5[path]/lib/visit.lib.php");
include_once("$g5[path]/lib/connect.lib.php");
include_once("$g5[path]/lib/popular.lib.php");
include_once("$g5[path]/lib/latest.lib.php");
?>
<h2 class="sound_only">최신글</h2>
<!-- 최신글 시작 { -->
<?php
// 최신글
$sql = " select bo_table from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id) where a.bo_device <> 'mobile' order by b.gr_order, a.bo_order ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i%2==1) $lt_style = "margin-left:20px";
else $lt_style = "";
?>
<div style="float:left;<?php echo $lt_style ?>">
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 5, 25);
?>
</div>
<?php
}
?>
<!-- } 최신글 끝 -->
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
12년 전
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 478
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 480
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 481
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 482
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 483
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 484
�몄씤 蹂듭� 愿�� �뚯떇
寃뚯떆臾쇱씠 �놁뒿�덈떎.
이렇게 나옵니다... 안되나봐요...
신경써주셔서 감사합니다.....
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 478
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 480
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 481
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 482
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 483
Warning: Cannot modify header information - headers already sent by (output started at /www/사이트 주소/index.html:2) in /www/careforaging_net/php/common.php on line 484
�몄씤 蹂듭� 愿�� �뚯떇
寃뚯떆臾쇱씠 �놁뒿�덈떎.
이렇게 나옵니다... 안되나봐요...
신경써주셔서 감사합니다.....
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
사노라가노라
12년 전
댓글을 작성하려면 로그인이 필요합니다.
12년 전
이럴수가...
됩니다..
저는 지금까지 include같은 참조를 위한 php 구문을 doctype 선언 바로 다음에 넣었거든요...
혹시나 하고 doctype 이전에.. 즉, 문서의 제일 위에 넣으니까 오류도 안생기고 잘 되네요.
몇 일동안 고생하고 몇 번이고 포기하고 다른 방법으로 하려고 했던 게 이렇게 풀리다니...
고맙습니다.
됩니다..
저는 지금까지 include같은 참조를 위한 php 구문을 doctype 선언 바로 다음에 넣었거든요...
혹시나 하고 doctype 이전에.. 즉, 문서의 제일 위에 넣으니까 오류도 안생기고 잘 되네요.
몇 일동안 고생하고 몇 번이고 포기하고 다른 방법으로 하려고 했던 게 이렇게 풀리다니...
고맙습니다.
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
채택
답변대기
답변대기
답변대기
답변대기
채택
채택
답변대기
답변대기
답변대기
채택
첫 줄 엔터 치고 두 번째 줄 부터 소스 반영 되었나 확인 해 보세요.
<?php -> <? 왼편이나 위에 공백 들어가면 에러 발생 됨