Today, We want to share with you Codeigniter config set and get variable.In this post we will show you codeigniter load config in library,, hear for codeigniter config production we will give you demo and example for implement.In this post, we will learn about codeigniter set config variable in controller with an example.
Codeigniter config set and get variable
I shall simple use Codeigniter “$this->config” variable for all the data setting set configuration item main value. as well as I shall use this “set_item()” and “item()” functions for very easy way to Codeigniter set and get value of array key.
Now, let’s basic and simple demo for Codeigniter config file item new value.
Set Config Value using Codeigniter:
Get Config Value using Codeigniter:
$liveMyURL = $this->config->item('liveMyURL');
Codeigniter Example of Config Value::
$this->config->set_item('liveMyURL','infinityknow.com'); $liveMyURL = $this->config->item('liveMyURL'); print_r($liveMyURL); exit;
I hope you get an idea about How to set and get config item value in Codeigniter?.
I would like to have feedback on my Infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.