Welcome Guest, Not a member yet? Register   Sign In
how to define global variable use in whole site?
#1

[eluser]Unknown[/eluser]
in the query i want to give table name from global array for use in whole site.
#2

[eluser]Abdul Malik Ikhsan[/eluser]
Code:
$ci = & get_instance();
$ci->var = 'value';
#3

[eluser]Unknown[/eluser]
from where i can define it i mean which file config.php or anywhere ?
#4

[eluser]PhilTem[/eluser]
I'd suggest you put these kind of things in constants defined in ./application/config/constants.php so you can access them side wide.




Theme © iAndrew 2016 - Forum software by © MyBB