일반페이지에 게시판 불러오는게 에러가나요.
본문
그누보드5 설치했구요.
일반페이지(test.php)에서 게시판만 불러서(노프레임으로) 삽입하려고 하는데요.
<?
$g4_path='.'; //기존 페이지 기준으로 root 의 상대경로
$bo_table='portfolio'; //게시판 테이블명
include_once("$g4_path/common.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>포트폴리오</title>
<link rel="stylesheet" href="<?=$g4[path]?>/style.css" type="text/css">
</head>
<body>
<a href="<?=$g4[path]?>/bbs/list.php">링크테스트</a>
<? include "$g4[path]/bbs/list.php"; ?>
</body>
</html>
이렇게 했는데요.
'링크테스트' 라고쓴 링크 부분은 잘나오고 링크도 맞게 잘되요.
그러는걸 봐선 경로는 잘된것 같은데...ㅠㅠ
Warning: include(/bbs/list.php): failed to open stream: No such file or directory in /host/home1/dms7139/html/index_failed.php on line 16 Warning: include(): Failed opening '/bbs/list.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /host/home1/dms7139/html/index_failed.php on line 16
이라고 경고가 뜹니다.
include가 안되는거 같은데 도대체 뭐가 문제일까요?ㅠㅠ 도와주세요.
답변 2
그누보드5버전을 설치하셨다고 하셨는데
불러오는 경로는 왜 $g4_path처럼 그누보드4버전을 불러오시는 건지?
그누보드5로 변수값을 변경해서 적용해보세요.
$g4['path'] 또는 $g4[path] → G5_PATH
그누보드5 경로를 써주셔야 합니다.