I need to modify my function to return also the current folder I am in. Here is my current function:
function getLinkFromHost($url){
$port = $_SERVER['REMOTE_PORT'];
$server = $_SERVER['HTTP_HOST'];
if($port == 443){
$type = "https";
} else {
$type = "http";
}
return $type . "://" . $server . "/" . $url;
}