Hello
I have installed Kohana in kohana directory in my xampp public folder. When I try
url::base();
I've got only /kohana/, but I want to http://localhost/kohana/
Any chance for get this by Kohana, or I must standard PHP?
Regards
Hello
I have installed Kohana in kohana directory in my xampp public folder. When I try
url::base();
I've got only /kohana/, but I want to http://localhost/kohana/
Any chance for get this by Kohana, or I must standard PHP?
Regards
You don't have to extend anything, just use URL::site
with the protocol
parameter:
$base_url = URL::site(NULL, TRUE);
This will generate a base URL with the current protocol. If you want to use a specific protocol:
$base_url = URL::site(NULL, 'http');
No need to reinvent the wheel here!