In the simplest case (if the file size is not large) the solution might look like this
<?php $lines = file('list.txt'); unset($lines[0]); file_put_contents('list.txt', implode('', $lines));
If the file is voluminous and it is not an option to write it completely into memory, you can recreate the temporary file next to it without the first line, and after it has been successfully created, rename it to list.txt
<?php $fd = fopen('list.txt', 'r'); $tm = fopen($tmpname = tempnam('.', 'list'), 'w+'); if($fd === false) exit('Не могу открыть целевой файл'); if($tm === false) exit('Не могу открыть временный файл'); $i = 0; while (($line = fgets($fd)) !== false) { if(++$i == 1) continue; fwrite($tm, $line); } fclose($fd); fclose($tm); rename($tmpname, 'list.txt');