我有这段代码
$link = file_get_contents("file.txt");
if(preg_match_all('/\b[0-9]{3}\s*[-]?\s*[0-9]{3}\s*[-]?\s*[0-9]{4}\b/', $link, $content, PREG_PATTERN_ORDER)){
$content = array_unique($content[0]);
foreach($content as $key=>$value)
{
echo $value;
echo "<br>";
}
}
它总是打印出这个数字1477276084,即使该数字不在文本文件中
文本文件的内容是
Name:
Phone: 1477276084
Name:
Phone: 2958692011
Name:
Phone: 2958692011
Name:
Phone: 2958692011
Name:
Phone: 9954129334
Name:
Phone: 123-812-4181
Name:
Phone: 609-182-5123
Name:
Phone: 609-182-5123
Name:
Phone: 609-182-5123
Name:
Phone: 609-182-5123
我甚至尝试将file.txt更改为网站,但数字仍然存在