📜  从链接 php 代码示例中删除 http https

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

代码示例1
function remove_http($url) {
   $disallowed = array('http://', 'https://');
   foreach($disallowed as $d) {
      if(strpos($url, $d) === 0) {
         return str_replace($d, '', $url);
      }
   }
   return $url;
}