Ajouter une nouvelle ligne PHP

$data = 'some data'.PHP_EOL;
$fp = fopen('somefile', 'a');
fwrite($fp, $data);
Spotless Stag