Thinkphp404页面设置

来源:互联网 发布:淘宝新店如何装修 编辑:程序博客网 时间:2024/06/08 10:52

Controller 增加 EmptyController.class.php

<?phpnamespace Frontend\Controller;use Think\Controller;class EmptyController extends Controller {    function _empty(){        header("HTTP/1.0 404 Not Found");        $this -> display("Public:404");    }}

view 增加404.html

<include file="Public:head" />    <div style="width:1140px; margin:0 auto" >        <img  style="width:1140px;" src="/Public/Frontend/Images/404_bg.jpg">    </div><include file="Public:footer" />

这样就可以定制自己的404了。