채택완료

일반페이지에 게시판 불러오는것 에러해결이 안되요.

2015-01-29 (목) 10:34:05 3,951

​그누보드5 설치했구요.
일반페이지(test.php)에서 게시판만 불러서(노프레임으로) 삽입하려고 하는데요.

<?
    $g5_path='.'; //기존 페이지 기준으로 root 의 상대경로
    $bo_table='portfolio'; //게시판 테이블명
    include_once("$g5_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="<?=$g5[path]?>/style.css" type="text/css">
</head>

<body>
<a href="<?=$g5[path]?>/bbs/list.php">테스트테스트</a>
<? include "$g5[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.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.php on line 16
이라고 경고가 뜹니다.


include가 안되는거 같은데 도대체 뭐가 문제일까요?ㅠㅠ 도와주세요.

--------------------------------------------------------

아래글에도 같은 질문을 드렸는데요. g4_path->g5_path라고 수정하면 된다고 하셔서 이렇게 했는데도...

여전히 같은 에러가 뜨네요.  

답글쓰는게 아직 3일이전이라 안되서 다시 질문 올립니다.

제발 알려주세요. ㅠㅠ 

|

답변 1개

채택된 답변
+20 포인트

include_once("$g5_path/common.php"); 

변경->

​include_once(G5_PATH.'/common​.php');​

 

이런식으로 변경해주셔야 합니다.

http://w3cweb.cafe24.com/bbs/board.php?bo_table=tb61&wr_id=5&cate_id=80 

그누보드4 - 5로 변경된 함수 정리 

답변을 작성하려면 로그인이 필요합니다.