电话源文件
phone.txt
123456
123456
123456
654321
654321
56464846465
5646489498
123456
654321
phone.php
<?php
$content = file_get_contents("phone.txt"); //读取文本中的字符串
$arr = explode("\n",$content); //将字符串以换行符拆分为数组
print_r(array_unique($arr)); //输出去除后的数组
?>