How to write to a file on the server in the site folder, in the server folder? not written to the file folder of the site - displays: "the file is not created." This example does not write the file to the site folder. The directory where you need to create and write the file is in the root folder of the site.
$today = date("dmY"); $id_price_list=18; $text="Прайс-лист ".$id_price_list." новый гуид ".$resAr['guid']." старый гуид ".$arDBElement["XML_ID"]."\r\n"; //$file="http://".SITE_SERVER_NAME."/logs_for_price_list/guid_1C_not_export/".$today.".txt"; $file="//logs_for_price_list/guid_1C_not_export/".$today.".txt"; echo $file; $handle = fopen($file, "a");//Открываем для записи в конец. if (!$handle) { echo "Oшибка: файл не создался-".$text; } else { fputs ($handle, $text); fclose($handle); }