본문 바로가기
CLASS/HTLML,CSS,JS

#9 / html include (by php)

by hingu 2024. 5. 30.

* 실제 도메인이 작동되야만 먹힘 ( 로컬에서는 x )

<!-- 최상단 -->
<header class="top">
    <?php include "./top.html"; ?>
</header>

 

 

<!DOCTYPE html> 은 작성하지 않는다

 

 

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML5 전용 레이아웃 태그</title>
    <link rel="stylesheet" href="./test18.css?v=1">
</head>
<body>
    <!-- 최상단 -->
    <header class="top">
        <?php include "./top.html"; ?>
    </header>

    <!-- 메뉴 설정(대메뉴,소메뉴) -->
    <nav class="menu">
        <?php include "./menu.html"; ?>
    </nav>

    <!-- 각각의 서브페이지에 보여지는 오브젝트를 출력하는 곳 -->
    <main>
        <!--배너-->
        <section class="banner" id="seeun">
            <?php include "./banner.html"; ?>
        </section> <!--여러번 사용가능 각 파트별로 구분 -->
        <!--상품출력-->
        <section class="product">
            <?php include "./product.html"; ?>
        </section>
        <!--공지사항&상품리뷰-->
        <section class="board">
            <?php include "./board.html"; ?>
        </section>
    </main>

    <!-- 하단 copyright -->
    <footer class="cp">
        <?php include "./copyright.html"; ?>
    </footer>
</body>
</html>