It is necessary to write a line at the beginning of the text file.
I make a record as follows:
$err_out=$path_catalog.$out; $temp = fopen($err_out, "r+"); $text = "Не удалось скопировать файлы:"; fwrite($temp, $text . "\r\n"); fclose($temp); The $text string is written to the file, but the characters of the subsequent (already existing at the time of writing) line are overwritten.
What are the ways to solve this problem?