If you're using 1.2, simply change that config file to this format:
<?php
$config['Email']['from'] = '[EMAIL PROTECTED]' ;
$config['Email']['subject'] = 'hello ... {visitor_name} ' ;
$config['Site']['phone_number1'] = '123412345';
?>
place that file in the app/config/ and then from your controller use
Configure::load('config_filename');
Then to read the variables (or anywhere in your app), use
Configure::read('Email.from');
Hope that helps!
On Nov 19, 9:28 am, Baz <[EMAIL PROTECTED]> wrote:
> Use Configure::read() and Configure::write()
>
> If you insist on just dumping variable names, I guess you could lump them in
> bootstrap.php?
>
> On Nov 19, 2007 8:51 AM, Adwin Wijaya <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello ...
>
> > I have many configuration files that i brought from my previous site
> > and i would like to use it.
> > I store it in config.php and the content looks like:
>
> > <?php
> > $email_from = '[EMAIL PROTECTED]' ;
> > $email_subject_greeting = 'hello ... {visitor_name} ' ;
> > $phone_number1 = '123-45678';
> > .........
> > ?>
>
> > How to add this configuration into the controller ?
> > I add with include 'config.php' ;
> > but it wont load the variables ... i use globals as well .. but it
> > doesnt work.
>
> > can you help me ?
>
> > Thank you !!!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---