Error when changing location of codeigniter views folder!

1

Following the installation steps of the official CI guide, I moved the folder views out of the folder application - now inside public_html . I get ERROR message on the homepage

  

Your views folder path does not appear to be set correctly. Please open the following file and fix this: index.php

I've set up $view_folder = 'public_html'; How to correctly specify the path of the views folder that is now in the public_html folder?

    
asked by anonymous 17.08.2015 / 15:19

1 answer

0

Open the file Loader.php that is in the ./system/core/Loader.php folder and change the following line (usually it is in line 130 of version 2.0):

$this->_ci_view_paths = array(APPPATH.'views/' => TRUE);

Change with the new path you want, for example:

$this->_ci_view_paths = array(FCPATH.'public_html/views' => TRUE);
    
17.08.2015 / 16:21