Answers for "php remove path from string url"

PHP
0

php remove path from string url

function stripUrlPath($url){
    $urlParts = parse_url($url);
    $newUrl = $urlParts['scheme'] . "://" . $urlParts['host'] . "/";
    return $newUrl;
}
Posted by: Guest on August-30-2021

Browse Popular Code Answers by Language