test.txt的内容
89, -71, 279, 208 -104
71, -71, 279, 208 -104
73, -71, 279, 208 -104
73, -71, 279, 208 -104
66, -71, 279, 208 -104
63, -71, 279, 208 -104
80, -71, 279, 208 -104
这是我看范例从字串里取代空白练习的程式码
<?php
$fn = " This line contains liberal use of whitespace.";
$fn = trim($fn);
$fn = preg_replace('/\s(?=\s)/', '', $fn);
$fn = preg_replace('/[\n\r\t]/','', $fn);
?>
想要把档案读进去并取代里面的空白及连续空白
请教大大,我该怎么修改