1. 程式人生 > >tp5 404頁面配置資訊

tp5 404頁面配置資訊

一、在application資料夾下config.php配置檔案 1、// 關閉應用除錯模式     'app_debug'              => false, 2、// 異常頁面的模板檔案     'exception_tmpl'         => APP_PATH.'404.html', 二、在application資料夾下建立404.html頁面 1.程式碼如下 <html> <head>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta name="robots" content="noindex,follow">     <title>頁面不存在</title>     <link rel="stylesheet" href="http://www.xtuan.com/css/404.css" type="text/css" />     <style>         body {             font-family: Arial,Helvetica,sans-serif;             font-size: 12px;             color: #000;             min-width: 980px;         }         * {             margin: 0px 0px;             padding: 0px 0px;         }         .found-logo {             width: 1000px;             margin: 30px auto 0;         }         a:visited {             text-decoration: none;             color: #fff;         }         a:link {             text-decoration: none;             color: #fff;         }         img {             border: none;             vertical-align: middle;         }         .not-found {             width: 1000px;             margin: 0 auto;             font-family: "微軟雅黑","Microsoft YaHei",arial,"宋體";             padding-top: 46px;         }         .clear {             clear: both;         }         .not-found .pic {             background: url("/static/images/404.png") no-repeat center;             width: 400px;             height: 180px;             margin: 0 auto;         }         .not-found .info {             width: 400px;             margin: 0 auto;         }         .not-found .info h5 {             font-weight: normal;             font-size: 26px;             color: #333;             margin: 26px 0;         }         .not-found .info p {             font-size: 14px;             color: #666;             line-height: 26px;         }     </style> </head> <body> <div class="found-logo"><a href="http://www.cctv.com" title="CCTV"><img style="width: 200px;" src="/static/index/img/logo/LOGO.png" alt=""></a></div> <div class="not-found clear">     <div class="pic"></div>     <div class="info">         <h5>抱歉,你所訪問的頁面不存在了!</h5>         <p>您可以嘗試:</p>         <p>1. 檢查輸入的網址,或者返回<a href="javascript:history.go(-1);">上一頁</a></p>         <p>2. 快速進入<a href="http://www.cctv.com">首頁</a></p>     </div> </div> </body> </html>