Welcome Guest, Not a member yet? Register   Sign In
Read/write values?
#1

[eluser]JackU[/eluser]
I need to read/write a value not using DB, sessions or cookies. Like you can use with ASP (Application variable)

Is there an easy way to do this?

#2

[eluser]Sudz[/eluser]
Hi,

You can use config class for storing application variable.

Setting item value
Code:
$this->config->set_item('item_name', 'item_value');

Getting item value
Code:
$your_variable = $this->config->item('item name');
#3

[eluser]CroNiX[/eluser]
[quote author="Sudz" date="1364222841"]Hi,

You can use config class for storing application variable.

Setting item value
Code:
$this->config->set_item('item_name', 'item_value');

Getting item value
Code:
$your_variable = $this->config->item('item name');
[/quote]
That doesn't permanently save anything though. It's good until the next request to the server, where the config is reloaded from the saved config files.




Theme © iAndrew 2016 - Forum software by © MyBB