Reputation: 412
How could i define another global path except base-url in codeigniter
like my base url
is like localhost/folder_name
while i want to use one another path like
localhost/another_folder/
Upvotes: 0
Views: 1707
Reputation: 7159
You can also set a global path
like base_url
in Codeigniter like the global variable
,
You can define global path
in application/config/constants.php
file like:
define("globel_variable","http://localhost/my_site");
Which can be accessible throughout all pages, ie; controllers, models and views
To display the global value,
echo globel_variable;
Upvotes: 2
Reputation: 412
IN the config file define
$config['variable']= 'your path'
use it just like
$this->config->item('variable');
I think this will help you according you requirement
Upvotes: 0