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

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

WBOY
WBOYOriginal
2016-06-06 20:28:191141browse

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>
Statement:
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