Thanks I tried Configure::store and it's working great. However I
noticed something that's a little confusing. When I use
Configure::store it creates a php file in app/tmp/cache/persistent and
the php file does not have any closing tag such as "?>". Is this
normal and reliable way to store a variable or I have made a mistake
somewhere. Basically the php file in the cache folder looks like this:

//START

<?php
$config = array();
$config['ApplicationSettings']['app_title'] = 'My Title Goes Here';

//END

As you can see there is no closing "?>" tag. My other question is does
Configure::store saves the file in another location except the tmp/
cache folder? If not isn't this an unreliable way to save data that I
want to use later?

Thanks again for your big help!

On Jul 16, 12:39 am, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
> And... if you wanna store this data "permanently" you must save on a local
> file.
> To do it, use Configure::store and Configure::load
>
> []'s
>
>
>
> On Tue, Jul 15, 2008 at 4:36 PM, Gonzalo Servat <[EMAIL PROTECTED]> wrote:
> > On Tue, Jul 15, 2008 at 4:02 PM, kik <[EMAIL PROTECTED]> wrote:
>
> >> [..snip..]
> >> ... As far as I understand when you
> >> use Configure::write it's storing a data in the config file and the
> >> data is permanently stored.
>
> > Nope. As far as I know, Configure::write() 'writes' the variable into the
> > Configure instance.
>
> >> But when I try to get the data from
> >> another controller or even another action of the same controller I'm
> >> not able to read the value.
>
> > If you are expecting to write in one call then read in another call, then
> > you probably want to use sessions for that.
>
> >> It seems that I'm able to get the value
> >> only from the same action that writes to Configure. Does this mean
> >> that Configure::write does not store the information permanently? For
> >> instance I have an action:
>
> > As above, that's correct. It does not store information permanently.
>
> > I will be thankfrul if someone explains to me how this works! Thank
> >> you in advance for any suggestions!
>
> > This is my understanding of the Configure class.
>
> > Group: If I gave any wrong info, please feel free to correct me.
>
> > - Gonzalo
>
> --
> Renan Gonçalves - Software Engineer
> Cell Phone: +55 11 8633 6018
> MSN: [EMAIL PROTECTED]
> São Paulo - SP/Brazil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to