随笔记录 蓝优 2021-3-1
<?php //输出 echo Matchurl("https://lanyou.vip/"); function Matchurl($param){ preg_match('/^http(s)?:\/\/(.*)\//U',$param,$url); $value = str_replace(array('http://','https://','/'),"",$url[2]); return $value; }