Esempio n. 1
0
File: get.php Progetto: Borvik/Munla
 /**
  * Returns the current domain name.
  * 
  * With null parameters this is essentially a wrapper for $_SERVER['SERVER_NAME'].
  * 
  * @param string (optional) $subdomain  The subdomain to combine with the host.
  * @param string (optional) $host       The host to combine with the subdomain.
  * 
  * @return string  The full domain name (ex. www.one.two.domain.com, where www.one.two is the subdomain)
  */
 public static function cache_fulldomain($subdomain = null, $host = null)
 {
     if (!isset($subdomain) && !isset($host)) {
         return get::passeddomain();
     }
     //$_SERVER['SERVER_NAME'];
     if (!isset($subdomain)) {
         $subdomain = get::subdomain();
     }
     if (!isset($host)) {
         $host = get::domain();
     }
     return sprintf('%s.%s', $subdomain, $host);
 }