空控制器与404的问题

浏览:538 发布日期:2015/05/26 分类:求助交流
<?php
// +----------------------------------------------------------------------
// | 医护网项目 空控制器
// +----------------------------------------------------------------------
// | Copyright (c) 2014 http://www.yihu.com All rights reserved.
// +----------------------------------------------------------------------

namespace Yihu\Controller;
use Yihu\Common\Controller\BaseController;

/**
 * 空控制器
 */
class EmptyController extends BaseController {
    public function index() {
        header('HTTP/1.1 404 Not Found');
        header("status: 404 Not Found"); 
        $this->display(':404');
    }
}
为什么这样的控制器会出错?
去掉        header('HTTP/1.1 404 Not Found');
        header("status: 404 Not Found"); 
就不会出错呢?
最佳答案
评论( 相关
后面还有条评论,点击查看>>