Advertisement
alex1984vn

Read file php line by line

May 15th, 2011
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.19 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>File read demo</title>
  4. </head>
  5. <body>
  6. <?
  7. $file = "/tmp/file1.txt";
  8. $f = fopen($file, "r");
  9. while ( $line = fgets($f, 1000) ) {
  10. print $line;
  11. }
  12. ?>
  13. </body>
  14. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement