There might be a more elegant way but this would work
<?php
//read file into array
$file = file($fileSRC);
// count elements in the array
$count = count($file);
// unset last row
unset($file[$count]);
// join array back together
$finishedFile = join("\n", $file);
?>
Just a rough idea, I just wrote the code out and didn't actually run it ;-)
--Bryan