避免提及始终加载页眉和页脚

时间:2015-04-18 06:23:39

标签: php codeigniter

如何避免加载在所有视图中加载headerfooter

我想加载页面。但我不想提到每次加载。

无论如何都要加载它。所以我的代码将更少

这是我有的控制器

public function index()
    {
        $this->load->view('includes/header');
        $this->load->view('includes/index');
        $this->load->view('includes/footer');
    }

public function blog()
    {
        $this->load->view('includes/header');
        $this->load->view('includes/blog');
        $this->load->view('includes/footer');
    }
    public function contact()
    {
        $this->load->view('includes/header');
        $this->load->view('includes/contact');
        $this->load->view('includes/footer');
    }

0 个答案:

没有答案