Hello,
28. 1. 2007, Sergei:
> what's an easy way to have some global variables and arrays available
> to my controllers and views?
You can create your config file (my_settings.php) in app\config
directory with variables:
$config['my_variable'] = '123';
and in controller you load this config file:
Configure::load('my_settings');
and you can use:
$my_variable = Configure::read('my_variable');
--
Michal Bilcik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---