the text is written to the file like this, this example does not work
//Файлы $admfile = 'admin.php'; $admexphrase = "PHP_EOL" . '<p><a href="admintoursample.php">toursample.php</a></p>'; if(file_put_contents($admfile, PHP_EOL . $admexphrase, FILE_APPEND)) { echo "succesadm"; } //Удаляется вот так $admcont = file_get_contents($admfile); $admcontold = array("$admexphrase"); $admcontnew = array(""); $admphrase = str_replace($admcontold, $admcontnew, $admcont); if(file_put_contents($admfile, $admphrase)) { echo "succes page\n"; }