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.
How can I access web folder from config.yml in a symfony2 app ? I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can access resources in your web directory using twig’s asset() function.
See http://symfony.com/doc/current/book/templating.html#linking-to-assets for more details.
I think you’ll want to avoid setting local paths in your config/parameters file, try and keep everything as dynamic as possible.