php判斷是否http或https開頭

 if($url && substr($url, 0, 7) !== "http://" && substr($url, 0, 8) !== "https://" && substr($url, 0, 2) !== "//" ){

          return FALSE;

    }

留言

此網誌的熱門文章