Thanks!!!
On 24 mayo, 12:50, Eno <[EMAIL PROTECTED]> wrote: > On Sat, 24 May 2008, [EMAIL PROTECTED] wrote: > > I added a yml file inside my app/mymodule/config, when i call to > > sfYaml::load how I refer to the file? > > > Is the path relative to the caller? I mean, Do I have to use a > > diferente path when calling from inside a template or actions? > > > $test = sfYaml::load('/app/module/config/test.yml'); ???? > > Im assuming that would be /app/myapp/modules/config/test.yml ? > > Im guessing you could use the sfConfig class to get the path for sf_root_dir > (which > will be the path to the root of your symfony project) and append what you > need to get to the YAML file. (Or more simpler, use sf_app_dir). > > Maybe something like: > > $test = sfYaml::load(sfConfig::get('sf_app_dir') . '/module/config/test.yml'); > > or more portable code: > > $test = sfYaml::load(sfConfig::get('sf_app_dir') . DIRECTORY_SEPARATOR . > 'modules' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . > 'test.yml'); > > -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---