Welcome Guest, Not a member yet? Register   Sign In
is it possible to change the views dir. location ?
#1

[eluser]alin4lex[/eluser]
is it possible to change the path from ./system/application/views to ./views ??

thanks.
#2

[eluser]xwero[/eluser]
Yes you have to change the loader class and the index.php to do it.

index.php (from line 78)
Code:
/*
|---------------------------------------------------------------
| DEFINE APPLICATION CONSTANTS
|---------------------------------------------------------------
|
| EXT        - The file extension.  Typically ".php"
| FCPATH    - The full server path to THIS file
| SELF        - The name of THIS file (typically "index.php)
| BASEPATH    - The full server path to the "system" folder
| APPPATH    - The full server path to the "application" folder
| PUBPATH       - The root directory of the public files
|
*/
define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');
define('PUBPATH',realpath(dirname(__FILE__)));
PUBPATH is added.

system/libraries/Loader.php (line 55)

change
Code:
$this->_ci_view_path = APPPATH.'views/';
to
Code:
$this->_ci_view_path = PUBPATH.'views/';
#3

[eluser]alin4lex[/eluser]
thanks dude. it works




Theme © iAndrew 2016 - Forum software by © MyBB