View file news/log/news.php
<?php $fp = fopen ("news/log/count.txt", "r"); $a = fread($fp, filesize('news/log/count.txt')); fclose ($fp); $a = str_replace(')','',$a); $a = str_replace('(','',$a); $a = trim($a); if ($a != 0) { while (is_file("news/nov$a.txt")) { include ("news/nov$a.txt"); echo "Дата: $data<br>"; echo "Заголовок: $titla<br>"; echo "Новость:<br> $news<br>"; --$a; echo '<hr>'; }; } else { echo 'Новостей еще нет.'; }; ?>