Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php remove path from string url

function stripUrlPath($url){
    $urlParts = parse_url($url);
    $newUrl = $urlParts['scheme'] . "://" . $urlParts['host'] . "/";
    return $newUrl;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #remove #path #string #url
ADD COMMENT
Topic
Name
7+7 =