📜  php 从字符串 url 中删除路径 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:56.382000             🧑  作者: Mango

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