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[\
Here's a method that might help:
function current_url() { $result = "http"; if($_SERVER["HTTPS"] == "on") $result .= "s"; $result .= "://".$_SERVER["SERVER_NAME"]; if($_SERVER["SERVER_PORT"] != "80") $result .= ":".$_SERVER["SERVER_PORT"]; $result .= $_SERVER["REQUEST_URI"]; return $result; }