테마폴더에 소스 적용후 에러가 뜹니다.
본문
아파치+Mysql+ php8.0 + 그누보드 5.4 설치후 정상실행이 되어
관리자모드에서
구입한 테마들을 업로드후 적용했는데 아래와 같이 에러가 뜨는데 어느부분이 문제인지요?
색인.php, 인덱스.php로 보면
C:/Apache24/htdocs/ime/mobile 디렉토리안에서 어느파일을 찾아야하는지요
답변 4
우선 에러문은 한글로 번역하지 말아주세요.....ㅠ.ㅠ
경로문제인듯하니 에러문에 나온데로 경로를 찾아가시면 어떤 파일이 불어오지 못했는지를 알 수 있을거 같네요
다시요..아래와 같이 뜹니다. 버젼문제인지요
Warning: Use of undefined constant G5_COMMUNITY_USE - assumed 'G5_COMMUNITY_USE' (this will throw an Error in a future version of PHP) in C:\Apache24\htdocs\theme\mobile\index.php on line 4
Warning: include_once(C:/Apache24/htdocs/theme/mobile/mobile/head.php): failed to open stream: No such file or directory in C:\Apache24\htdocs\theme\mobile\index.php on line 9
Warning: include_once(): Failed opening 'C:/Apache24/htdocs/theme/mobile/mobile/head.php' for inclusion (include_path='.;C:\php\pear') in C:\Apache24\htdocs\theme\mobile\index.php on line 9
Fatal error: Uncaught Error: Call to undefined function latest() in C:\Apache24\htdocs\theme\mobile\index.php:28 Stack trace: #0 C:\Apache24\htdocs\index.php(8): require_once() #1 {main} thrown in C:\Apache24\htdocs\theme\mobile\index.php on line 28
index.php파일입니다.
================================================
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(G5_COMMUNITY_USE === false) {
include_once(G5_THEME_MSHOP_PATH.'/index.php');
return;
}
include_once(G5_THEME_MOBILE_PATH.'/head.php');
?>
<!-- 메인화면 최신글 시작 -->
<?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 <> 'pc' ";
if(!$is_admin)
$sql .= " and a.bo_use_cert = '' ";
$sql .= " order by b.gr_order, a.bo_order ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest('theme/basic', $row['bo_table'], 5, 25);
}
?>
<!-- 메인화면 최신글 끝 -->
<?php
include_once(G5_THEME_MOBILE_PATH.'/tail.php');
?>
Fatal error: Uncaught Error: Call to undefined function latest() in C:\Apache24\htdocs\theme\mobile\index.php:28 Stack trace: #0 C:\Apache24\htdocs\index.php(8): require_once() #1 {main} thrown in C:\Apache24\htdocs\theme\mobile\index.php on line 28
function latest() 호출을 하지 못하였다는 것이구요. head나 index 자체에 latest.lib.php 호출하는곳이 있는지 확인해보시면 될 듯합니다.
테마가 제대로 적용되지 않은 것입니다.
/theme 디렉토리 안에.. '테마명'으로 된 폴더가 있어야 됩니다. -> 이후 관리자 > 환경설정 > 테마 에서 '사용'
ex. /theme/basic -> 베이직 테마
/theme/mint -> 민트 테마