Undefined index: HTTP_HOST
Hej EksperterJeg er ved at installere Jaws Project på min server men er stødt på denne fejl:
Notice: Undefined index: HTTP_HOST in C:\httpd\HtDocs\www\pilevang\include\Jaws\Utils.php on line 75
Stykket hvor fejlen ligger ser sådan her ud:
/**
* Get base url
*
* @access public
* @param string $script_name base script
* @return string url of base script
*/
function getBaseURL($script_name)
{
$site_url = array();
$site_url['scheme'] = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on')? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'];
if (false === strpos($host, ':')) {
$site_url['host'] = $host;
} else {
$site_url['host'] = substr($host, 0, strpos($host, ':'));
$site_url['port'] = substr($host, strpos($host, ':') + 1);
}
$path = strip_tags($_SERVER['PHP_SELF']);
if (false === strpos($path, $script_name)) {
$path = strip_tags($_SERVER['SCRIPT_NAME']);
}
$site_url['path'] = substr($path, 0, strpos($path, $script_name)-1);
$url = $site_url['path'];
$url = $site_url['scheme'] . '://' . $site_url['host'] . (isset($site_url['port'])? ':'.$site_url['port'] : '') . $url;
return $url;
}
Er der nogen der kan hjælpe???
T2C
