Home > Backend Development > PHP Tutorial > Ci怎么更改views文件夹的位置?

Ci怎么更改views文件夹的位置?

WBOY
Release: 2016-06-06 20:28:19
Original
1221 people have browsed it

Ci怎么更改views文件夹的位置?

回复内容:

Ci怎么更改views文件夹的位置?

在index.php的131行左右,可以设置$views_folder,你看下是不是你需要的!

在application\core\下新建MY_Loader.php

<code><?php class MY_Loader extends CI_Loader{
    public function __construct(){
        parent::__construct();
        $this->_ci_view_paths = array(FCPATH.'/templates/'=> TRUE);
    }
}
?></code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template