Is there an easy way to get the ServerName in Symfony?
Posted
by greg0ire
on Stack Overflow
See other posts from Stack Overflow
or by greg0ire
Published on 2010-06-11T08:16:58Z
Indexed on
2010/06/11
9:23 UTC
Read the original article
Hit count: 238
I have been searching for an easy way to get the ServerName of the machine where Symfony runs in Symfony (so that my app adapts when it is used on a host with a different ServerName), but I couldn't find one. I created a variable in app.yml and I fetch it, but I still wonder if there is no easier way to do this. How are you doing this? I'm using Symfony 1.2 and 1.4 on different projects.
© Stack Overflow or respective owner