Guest User

Untitled

a guest
Dec 22nd, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.  
  3. $fileName = urldecode($_GET['file']) . ".txt";
  4.  
  5. if(FALSE != ($hFile = @fopen($fileName, 'r')))
  6. {
  7.     while(FALSE !== ($lineFile = fgets($hFile)))
  8.     {
  9.         $lineFile = trim($lineFile);
  10.         if($lineFile != "")
  11.         {
  12.             nejakaAkce($lineFile);
  13.         }
  14.     }
  15. }
  16. else
  17. {
  18.   exit("Soubor neexistuje.");
  19. }
  20.  
  21.  
  22. function nejakaAkce($radekSouboru)
  23. {
  24.     echo mt_rand(0, 10000) . " {$radekSouboru}\n";
  25. }
Advertisement
Add Comment
Please, Sign In to add comment