Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I access "web" folder from config.yml in symfony2

Tags:

symfony

How can I access "web" folder from config.yml in a symfony2 app ? I have tried %web%, %base_dir%, %asset_dir% and am running into a brick wall.

like image 748
Purplefish32 Avatar asked Dec 08 '22 23:12

Purplefish32


1 Answers

In config.yml you can use %kernel.root_dir%/../web.

If you want a handy shortcut, in your parameters.ini you can define something like :

web_dir = %kernel.root_dir%/../web

Then in config.yml you will use %web_dir%.

like image 197
iamdto Avatar answered Feb 05 '23 03:02

iamdto