The same question troubles my mind a long time ago, but it seems that the only way of deleting a line is first to put all the file in an array (possibly with the file() function), and then truncate the file to zero length and put again all the lines back, except the line you wanted to delete. Seems to be very slow but it works ok for me.
Hope I helped.
Dionisos