On Jul 16, 4:20 am, kik <[EMAIL PROTECTED]> wrote: > 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?
Ending ?> are optional and not necessary if you are not switching out of 'code' mode. For example no drupal files have ending ?> As for the this use. I think sessions would be a much better solution. As soon as more than one user starts to use this application, the Configure value will start to get clobbered. And behavior dependant on the state of your configure value will become unpredictable at best. -Mark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
