Prova
Codice PHP:$x = '<ricetta attach';
$e = explode($x,file_get_contents('ricette/ricettario.xml'),2);
$e[0] = file_get_contents('ricette/random.xml').PHP_EOL.$x;
file_put_contents('new.xml',implode($e));
Prova
Codice PHP:$x = '<ricetta attach';
$e = explode($x,file_get_contents('ricette/ricettario.xml'),2);
$e[0] = file_get_contents('ricette/random.xml').PHP_EOL.$x;
file_put_contents('new.xml',implode($e));