How to change the Views path in CodeIgniter

Posted by Zahlan on July 26, 2012

Step 1:

open Loader.php file located in ./system/core/loader.php for editing.

Step 2:

Search for $this->_ci_view_paths (since CodeIgniter 2.0 go to line 130) and replace this

with this code

[php]$this->_ci_view_paths = array(‘your/views/path’ => TRUE);[/php]

Note: you can use FCPATH to go to your CodeIgniter root folder like this

That’s it 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *