$contains = Str::contains($domain, ['http://', 'http://']);
if (!$contains) {
if (!filter_var('http://' . idn_to_ascii($domain), FILTER_VALIDATE_URL)) {
$this->err = '行'.($k+1).'格式错误';
return false;
}
} else {
if (!filter_var(idn_to_ascii($domain), FILTER_VALIDATE_URL)) {
$this->err = '行'.($k+1).'格式错误';
return false;
}
}
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交