CI 可以修改VIew 的路径么
我想把 app 下的view 移到项目的根目录下 并修改文件价名称为 templets 可以,拓展下Loader即可(system/core/Loader.php)。拓展方法参考手册。默认情况下,在Loader的解析函数里面定义了views的路径:/**
* Constructor
*
* Sets the path to the view files and gets the initial output buffering level
*
* @access public
*/
function __construct()
{
$this->_ci_view_path = APPPATH.'views/';
$this->_ci_ob_level= ob_get_level();
$this->_ci_library_paths = array(APPPATH, BASEPATH);
$this->_ci_helper_paths = array(APPPATH, BASEPATH);
$this->_ci_model_paths = array(APPPATH);
log_message('debug', "Loader Class Initialized");
}
要善于查看代码。
页:
[1]