CI 코드

제목 [팁] 404에러페이지 꾸미기
글쓴이 ci세상 작성시각 2009/08/31 11:46:45
댓글 : 1 추천 : 0 스크랩 : 0 조회수 : 18605   RSS



위의 메세지 창은 CI만의 404 에러 페이지 인데요 이것만 보아도 CI로 만들어 졌구나 쉽게 알 수 있습니다.

이러한 에러페이지도 신경써야 할때가 있는데요 CI는 그부분까지도 고려해 주었습니다.

application/errors/error_404.php 파일을 디자인 수정하시면 됩니다.

제가 네이버의 경우를 예로 조금 응용해 보았습니다.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>네이버 :: 페이지를 찾을 수 없습니다.</title>
<link rel="stylesheet" type="text/css" href="http://www.naver.com/css/err.css" />
</head>

<body>

<div id="wrap">
    <div id="header">
        <h1><a href="http://www.naver.com/"><img src="http://static.naver.com/w8/err/lg_naver.gif" alt="NAVER" width="145" height="33" /></a></h1>
        <p class="menu"><a href="http://www.naver.com/">네이버홈</a> | <a href="http://help.naver.com/">고객센터</a></p>
    </div>
    <div id="container">
        <h2><?php echo $heading; ?></h2>
        <div class="content">
            <?php echo $message; ?>
        </div>
        <form class="search" style="margin-top:50px;" name="search" action="http://search.naver.com/search.naver" method="get">
            <input type="hidden" name="sm" value="nnf_hty">
            <fieldset class="window02">
                <legend>검색</legend>
                <input type="text" title="검색" name="query" maxlength=255 value="" class="box_window" accesskey="s">
                <input src="http://static.naver.com/w8/err/btn_sch.gif" onmouseover="this.src='http://static.naver.com/w8/err/btn_sch_over.gif'" onmouseout="this.src='http://static.naver.com/w8/err/btn_sch.gif'" alt="검색" type="image" class="btn_window">
            </fieldset>
            <p class="sch_desc">네이버 검색으로 원하시는 페이지를 찾으실 수 있습니다.</p>
        </form>
    </div>
    <address id="footer">
        <img src="http://static.naver.com/w8/tx_address.gif" alt="Copyright © NHN Corp. All Right Reserved." width="312" height="20" border="0" usemap="#NHN" />
        <map name="NHN" id="NHN"><area shape="rect" coords="142,5,205,19" href="http://www.nhncorp.com" alt="NHN" /><area shape="rect" coords="1,1,74,19" href="http://www.nhncorp.com/" alt="NHN Corp." /></map>
    </address>
</div>

</body>
</html>


## 결과모습 ##






 

 다음글 [팁] CI를 모듈화 처리한다 Matchbox (8)
 이전글 [lib추가] 브라우져 닫았을때 세션종료시키기

댓글

emc / 2009/08/31 14:52:12 / 추천 0
보통 .htaccess 파일에 세팅해도 됩니다.
근데... ci는 위에 설명한 파일을 불러들이는 모양이네요.