그누보드5 include_once
index.html 문서를 만들고 최신글불러올때는
$g4_path="../gnuboard4"; include_once("../gnuboard4/common.php"); include_once("$g4[path]/lib/latest.lib.php"); ?>
이와같이했었는데
그누보드5
1번 같이하라는....
$g5_path="./g5"; include_once("./g5/common.php"); include_once("./g5/head.sub.php");
?>
2번 같이하라는...
include_once("./_common.php"); include_once(G5_URL."/head.sub.php"); include_once(G5_LIB_PATH."/outlogin.lib.php"); include_once(G5_LIB_PATH."/latest.lib.php"); include_once(G5_LIB_PATH."/visit.lib.php");
?>
둘다 제대로 않되요.
그누보드4에서는 쉽게 했었는데
그누보드5에서는 도무지 어떻게 하는지 모르겠습니다.
답변 2개
별도의 하위 폴더에 g5를 설치하셨다면..
루트 index 파일이 있는 곳에 _common.php 이름으로 파일을 하나 새로 만들고
파일 안의 내용은 이렇게 하세요.
include_once('./g5/common.php');
?>
그리고 index 파일 상단에는 이렇게..
include_once("./_common.php");
include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
?>
답변에 대한 댓글 2개
head.sub.php 파일을 보면 <html>태그부터 해서 <body>태그까지 이미 있기 때문에
여기는 전부 중복되므로 삭제하고 head.sub.php 파일 하나로 통합하는 게 낫습니다.
삭제해야 할 부분..
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>무제 문서</title>
<link href="pre.css" rel="stylesheet" type="text/css">
</head>
<body>
하단도 </body></html> 여기를 삭제하고 tail.sub.php 파일을 인클루드해서 사용하는 게 좋고요.
댓글을 작성하려면 로그인이 필요합니다.
최신글을 불러오는게 그누보드5에서는
해당 2번 3번 둘다 아닙니다만? 어떤게 안되신다는건지 모르겠네요
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/lib/common.lib.php on line 135
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/common.php on line 620
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/common.php on line 622
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/common.php on line 623
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/common.php on line 624
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/common.php on line 625
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/km_hgsusan/www/index.php:1) in /home/hosting_users/km_hgsusan/www/g5/common.php on line 626
답변에 감사드립니다.
위에 알려주신대로 했는데 이런식으로되네요.
인덱스 파일있는데 g5폴더만든거 맞아요
소스는 대략이런거요
<?php
include_once("./_common.php");
include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>무제 문서</title>
<link href="pre.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrap">
<header id="header">
<p>익스프레스</p>
<nav id="nav">
<ul>
<li><a href="#">포장이사</a></li>
<li><a href="#">원룸이사</a></li>
<li><a href="#">기업이전</a></li>
<li><a href="#">사무실이사</a></li>
<li><a href="#">이사서비스</a></li>
<li><a href="#">사다리차문의</a></li>
<li><a href="#">회원가입</a></li>
<li><a href="#">로그인</a></li>
</ul>
</nav>
</header>
<section id="section">
<article class="article1">
<div>여기에 새 Div 태그의 내용 입력</div>
</article>
<article class="article2">
<div>
<?=latest("basic","not",5,15);?>
</div>
</article>
<article class="article3">
<div></div>
</article>
<aside class="aside">
<div>사이드</div>
</aside>
</section>
<footer id="footer">
<article>
<div> <h1>익스프레스</h1></div>
<div>
<ul>
<li>copyRIGHT ©2016 익스프레스.com </li>
<li>ALLRIGHTS RESERVED</li>
<li>이삿짐센터/주소:00000000</li>
<li>대표전화:000-000-0000/</li>
<li>화물운송허가번호:제000호</li>
<li>통신판매업:00000전자상거래등록</li>
</ul>
</div>
</article>
</footer>
</div>
</body>
</html>