• 목록
  • 아래로
  • 위로
  • 1
  • 260578
  • 조회 수 608
<header>
    <div id="screen"></div> <!-- 헤더 부분. -->
    <div class='navbar'>
      <ul class="nav">
        <li class="lit"><a href="index.php">ByWiki</a></li>
        <li id="sidenav">
          <a href="#" id="sidenav-toggle">☰</a>
          <nav id="sidenav-menu">
            <header id="sidenav-header">
              <span id="close-sidenav">×</span>
              <div>메뉴</div>
            </header>
            <ul>
              <li><a href="board.html">게시판</a></li>
              <li><a href='index.php?return=도움말'>도움말</a></li>
            </ul>
          </nav>
        </li>        
          <li id="searchbox" class="til"><form action="search.php" method="post" target="m_view"><input type="text" name="name" class="searchtext" placeholder="검색.."/>
         <input type="image" src="img\search.png"></form></li>
      </ul>
    </div>
</header>
<section id="contents">
    <div id="main"> <!-- 콘텐츠가 보여질 부분. -->
        <div class="view">
                                                <section id="m_main">
                                              <span class="tbar">
                                              <ul>
                                                <li>
                                                  <form action="history.php" method="post">
                                                    <input type="hidden" name="hist" value="<?php echo $name;?>" />
                                                    <input type="image" src="img/history.png">
                                                  </form>
                                                </li>
                                                <li>  
                                          </li>
                                                <li>
                                                  <form action="do.php" method="post">
                                                    <input type="hidden" name="less" value="<?php echo $name;?>" />
                                                    <input type="image" src="img/Editing-edit-icon.png">
                                                  </form>
                                          </li>

                                              </ul>
                                              </span>
                                        <span id="d">
                                              <h1><?php echo $name;?></h1>
                                              <hr class="title">
                              <div id="article"><?php include nl2br("d/$name.html", false);
                              ?></div>
                                          </span>
                                            </section>
        </div>
    </div>
    </section>
    <footer>
    <div id="bottom"> <!-- 푸터 부분.-->
      <div class="footer">
        <a class="footer" target="m_view" href="LICENSE">9.74 With Bywiki.</a>
      </div>
    </div>
    </footer>


적용예




줄바꿈이 처리되지 않습니다. 어떻게 해야할까요?

작성자
260578 58 Lv. (60%) 274780/278480EXP

반가워요!

댓글 1

네모
profile image

include 함수의 인자는 파일 내용이 아니라 파일명 이므로, 당연히 nl2br 은 적용되지 않습니다.
 

<?php
// HTML 파일의 including만 가능합니다. PHP 문법은 파싱하지 않아요.
function include_html_nl2br($path){
    $contents = file_get_contents($path);
    print(str_replace("\n", base64_decode('PGJyIC8+'), $contents));
    return;
}



comment menu
2018.11.27. 05:31

신고

"네모님의 댓글"

이 댓글을 신고 하시겠습니까?

권한이 없습니다.
번호 제목 글쓴이 날짜 조회 수
공지 [1차 해결 및 추가] 서버 접속 불가 문제 안내 12 마스터 24.06.20.15:22 276
공지 [작업 완료] 설 명절 맞이 서버 업데이트 안내 3 마스터 24.02.11.17:21 2308
공지 [중요] 호스팅 만료와 관련하여 일부 수칙이 변경됩니다. 4 마스터 23.01.14.02:23 5997
공지 [필독] 질문하는 방법 17 마스터 18.02.23.03:09 4585
86 [수강신청] Java 개론 강좌를 수강해도 괜찮을까요?? 9 image 이니스프리 21.01.23.22:30 158
85 질문 2 poiega 22.09.03.23:35 157
84 Let's Encrypt SSL 인증서 갱신이 안됩니다. 1 HighSpeed 21.04.16.17:29 157
83 어떤 문제인가요? 1 image 260578 18.09.01.12:10 156
82 php 오류페이지 설정? 1 Ruwaku 20.09.21.18:24 154
81 질문합니다. 로그인설정을 바꾸고 싶네요~ 2 youngsik 18.07.05.11:12 154
80 php 모든 페이지에 적용하기? 1 Ruwaku 20.08.28.17:21 151
79 브라우저 익스텐션이 있는 self hosted VPN으로 어떤 것이 있을까요? image 이니스프리 22.03.20.13:57 150
78 글쓰기 템플릿도 있나요? 4 GsusWeb 20.07.01.11:38 150
77 커뮤니티 사이트에서 모바일 접속시 Rich-Text 에디터를 사용하지 않는 것이 더 좋을까요? 6 이니스프리 21.02.13.23:19 148
76 노트9 케이스 추천을 다시 부탁드립니다 ㅠㅠ 11 이니스프리 20.05.22.21:24 148
75 href에 링크를 걸어도 그 페이지로 이동하지 않습니다 1 image 손가락개 21.10.24.05:09 147
74 DB Charset 관련해서 질문 드려요! 4 이니스프리 20.10.01.22:22 147
73 구글 검색 노출을 빠르게 하는방법? 질문 14 슬기 20.07.07.23:51 147
72 (해결) 4 260578 20.05.18.20:51 143
71 아바스트 왜 이럴까요? 11 image 국내산라이츄 21.01.12.04:26 141
70 중고 모니터 액정이 나갔는데 수리하는게 나을까요? 새로 사는게 나을까요? 10 필우 20.11.11.10:47 139
69 xlsx 파일로 된 DB백업 데이터를 가져오기로 DB에 넣으려면 어떻게 해야할까요? 4 image 동파육 22.08.31.01:49 136
68 500 에러 4 wikiowner 20.12.12.10:05 136
67 위키 호스팅에 대해 궁금점 9 wikiowner 20.11.04.15:05 136