thinkphp 自定义模拟404返回

      发布在:后端技术      评论:0 条评论
    public function s404(){

http_response_code(404);
//        return $this->fetch('portal@/404');
//        自定义模拟的404  直接return状态码还是200  所以这里使用了exit退出直接返回数据
exit($this->fetch('portal@/404'));
}


相关文章
热门推荐