Base URL in Kohana 3

ed. picture ed. · Feb 2, 2010 · Viewed 13.1k times · Source

How do I get the base URL in Kohana 3?

Is there a solution in raw PHP?

Answer

Gerard Banasig picture Gerard Banasig · Feb 2, 2010

In Kohana it's

echo url::base();

http://docs.kohanaphp.com/helpers/url


In raw PHP

echo "http://".$_SERVER['HTTP_HOST']."/NameOfApp";