murvinlai
murvinlai

Reputation: 50355

How to get the host name in symfony?

if native php, i can do it like that: $_SERVER['SERVER_NAME'];

what about in symfony? what should I use?

Upvotes: 1

Views: 6175

Answers (1)

Sergio
Sergio

Reputation: 301

The sfAction class have a method called getHost(). I guess it's that you need, but you need to call it from an instance.

Upvotes: 4

Related Questions