tags:

views:

342

answers:

2
+1  Q: 

Kohana 3 Base URL

Hello,

How do I get the base URL in Kohana 3?

Is there a solution in raw PHP?

Thanks.

+3  A: 

In Kohana its

echo url::base();

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


In raw php

http://".$_SERVER['HTTP_HOST']/NameOfApp
Gerard Banasig
A: 

If you're worried about lots of url::base() calls, you can turn it into a constant.

define('PATH_BASE', url::base());
alex