Nasıl Kohana 3 taban URL almak mı?
Ham PHP bir çözüm var mı?
Kohana o var
echo url::base();
http://docs.kohanaphp.com/helpers/url
Ham PHP
echo "http://".$_SERVER['HTTP_HOST']."/NameOfApp";
Kohana 3 için, bu URL::base().
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
Eğer url::base() aramaların sürü hakkında endişeli iseniz, sürekli içine açabilirsiniz.
url::base()
define('PATH_BASE', url::base());
Ben kullanıyorum ve o inşaat.
echo URL::base(); or echo URL::base(true);