채택완료

html기본 문서에서 최신글 호출 상단에 어떤 구문이 추가 되어야 하나요?

2017-11-17 (금) 22:25:41 2,480

아래와 같이 html 빈문서에

그누5 최신글을 호출 할렴 어떻게 해야하나요?

latest.lib.php 파일을 넣어도 출력이 안되네요

어떻게 해야하는지 답변 좀 부탁드립니다!!


<?php
include_once(G5_LIB_PATH.'/latest.lib.php');
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> New Document </title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 </head>

 <body>
  

 <?php
echo latest("basic", test, 5, 25);
 ?>

 </body>
</html>

|

답변 3개 / 댓글 1개

채택된 답변
+20 포인트

빈문서의 경로가 그누보드를 기준으로 어디에 있는지를 확인후

문서와 동일 폴더에 _common.php 를 준비하고

_common.php 내용에는   common.php 의 상대경로로 내용을 수정하세요

2017-11-18 (토) 12:25:23

임의의 페이지를 만든 폴더가, sample 이라면

/sample 디렉토리에,

/bbs 디렉토리의 _common.php, _head.php, _tail.php 복사 후,

sample.php 를 

Copy
<?php
include_once('./_common.php');

include_once('./_head.php');

 

// 넣고 싶은 내용

 

include_once('./_tail.php');

?>

형태로 작성하면 됩니다.

최신글 함수 위에 이것도 추가.

include_once('./_common.php');

답변에 대한 댓글 1개

그거 추가 해도 안되네요..

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