Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. <?php
  2. //чтение
  3. $fl1=fopen("kniga.txt", "r");
  4. echo '<div class="div1">';
  5. $n=1;
  6. while (!feof($fl1)) {
  7.     $t1=fgets($fl1);
  8.     if ( $n > 0 ) {
  9.         echo '<h1>'.$t1.'</h1>';
  10.         $n--;
  11.     }
  12.     else {
  13.         echo $t1.'<br>';
  14.     }
  15.    
  16. }
  17. echo '</div>';
  18. fclose($fl1);
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement