[왕초보] 메인페이지 만든 후 그 다음 할일(please, help me)

2014-07-07 (월) 22:59:30 7,591

메인 페이지를 만들었습니다.

<html>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">

<title>열심히 살자</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">​

메인페이지 소스는 이런식으로 시작합니다.

최근게시물 소스를 적용하고 싶은데...

위의 소스 <html>위에 뭘 인클루드 시켜야 하지 않을까요?

실제 예를 들어 소스 좀 알려주세요~ 

답변 1개

2014-07-08 (화) 09:32:42

index.php 파일을 참고하세요

Copy
<?phpinclude_once('./_common.php');// 초기화면 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.if ($config['cf_include_index']) {    if (!@include_once($config['cf_include_index'])) {        die('기본환경 설정에서 초기화면 파일 경로가 잘못 설정되어 있습니다.');    }    return; // 이 코드의 아래는 실행을 하지 않습니다.}if (G5_IS_MOBILE) {    include_once(G5_MOBILE_PATH.'/index.php');    return;}include_once('./_head.php');?><h2 class="sound_only">최신글</h2><!-- 최신글 시작 { --><?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 <> 'mobile' ";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++) {    if ($i%2==1) $lt_style = "margin-left:20px";    else $lt_style = "";?>    <div style="float:left;<?php echo $lt_style ?>">        <?php        // 이 함수가 바로 최신글을 추출하는 역할을 합니다.        // 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);        echo latest("basic", $row['bo_table'], 5, 25);        ?>    </div><?php}?><!-- } 최신글 끝 --><?phpinclude_once('./_tail.php');?>​
 

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