Show pagesourceOld revisionsBacklinksBack to top Share via Share via... Twitter LinkedIn Facebook Pinterest Telegram WhatsApp Yammer RedditRecent ChangesSend via e-MailPrintPermalink × $filename = 'whatever'; $fh = @fopen($filename, 'r'); if ( ! $fh ) { throw new Exception("Failed to open ${filename}"); } while ( ( $text = fgets($fh) ) !== false ) { echo $text; } snippets/php/fgets.txt Last modified: 26-Jan-2021 20:01by Steve Joynt