2010-02-02 13 views

Répondre

4

Si vous êtes inquiet au sujet de nombreux url::base() appels, vous pouvez le transformer en une constante .

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

Pour Kohana 3, il est URL :: base().

De la doc:

// Absolute URL path with no host or protocol 
echo URL::base(); 

// Absolute URL path with host, https protocol and index.php if set 
echo URL::base('https', TRUE); 

// Absolute URL path with host and protocol from $request 
echo URL::base($request); 

Ref .: http://kohanaframework.org/3.1/guide/api/URL

2

J'utilise cela, et il fonctionne.

echo URL::base(); 
or 
echo URL::base(true);