• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.