/** * Return the current server host * * file. * @access public * @static */ public static function host() { if (!Application::isCommandLine()) { $ret = 'http://' . $_SERVER['HTTP_HOST']; $dir = dirname($_SERVER['PHP_SELF']); if ($dir != '/') { $ret .= $dir . '/'; } } else { $ret = constant('COMMAND_LINE_HOST'); } return $ret; }