Php Remove Path From String Url

[Solved] Php Remove Path From String Url | Php - Code Explorer | yomemimo.com
Question : php remove path from string url

Answered by : borma425

function stripUrlPath($url){ $urlParts = parse_url($url); $newUrl = $urlParts['scheme'] . "://" . $urlParts['host'] . "/"; return $newUrl;
}

Source : https://stackoverflow.com/questions/19040904/php-strip-path-from-url-no-built-in-function/19040959 | Last Update : Mon, 06 Sep 21

Answers related to php remove path from string url

Code Explorer Popular Question For Php