The best for this is tu use the "config.php" in the "config" folder ..
In your config.php you can declare such variable :
$config['SMTP'] = array('hostl' => 'localhost',
'port' =>
25);
In your bootstrap :
Configure::load('config');
In controller :
Configure::read('SMTP'); // will return an array (host, port)
Configure::read('SMTP.host'); // will return host
Hope this helps
On Aug 2, 4:03 pm, CX <[EMAIL PROTECTED]> wrote:
> hi guys,
>
> i have a php file in "/app/config/myfile.php" and i include it at
> "bootstrap.php" file, then in my "app_controller.php" i have an action
> that reads the variables defined at "myfile.php" but i can't get it to
> work.
>
> "myfile.php" has variables like this:
> <?php
> $mydata = array();
> $mydata["var1"] = 'hello';
> $mydata["var2"] = 'world';
> ?>
>
> how can i include that file and access the variables that it contains
> from de app_controller?
>
> thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---