mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-02-13 17:12:41 +08:00
兼容php8
This commit is contained in:
parent
fa1191eb71
commit
e734def503
@ -91,7 +91,7 @@ class addressMaker{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($line{0} != '|' || $line{1} != '|'){
|
if($line[0] != '|' || $line[1] != '|'){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class addressMaker{
|
|||||||
$end_pos = strpos($str_hosts, "\n", $i);
|
$end_pos = strpos($str_hosts, "\n", $i);
|
||||||
$line = trim(substr($str_hosts, $i, $end_pos - $i));
|
$line = trim(substr($str_hosts, $i, $end_pos - $i));
|
||||||
$i = $end_pos + 1;
|
$i = $end_pos + 1;
|
||||||
if(empty($line) || ($line{0} == '#')){//注释行忽略
|
if(empty($line) || ($line[0] == '#')){//注释行忽略
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$line = strtolower(preg_replace('/[\s\t]+/', "/", $line));
|
$line = strtolower(preg_replace('/[\s\t]+/', "/", $line));
|
||||||
@ -275,4 +275,4 @@ class addressMaker{
|
|||||||
$write_len += fwrite($fp, $str_result);
|
$write_len += fwrite($fp, $str_result);
|
||||||
return $write_len;
|
return $write_len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user