• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom configuration checking function .

#1
[eluser]Dileep[/eluser]
Hello there ,

I have made a custom configuration file for my website,it includes the configuration of my website.

can i write a function to check the configuration outside the controller ?

as an example : i have a configuration file named siteconfig.php and a configuration item is :
Code:
$config['sitestatus']='UP';
//Values are UP and DOWN

when the $sitestatus is DOWN then i want to prevent the page loading and need to display a custom message/page.

there are somany configuration files and items on it,so can i create a function for validating the configurations ?because i dont want to check these on each and every controllers,i just need this as a function.

How can i achieve that ? and how can i use that ?

its looks like a newbie Q ,but i really need a solution .

Thanks in advance.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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