From 13f8e3c1cb2b1ed4a18043b98b7330eb93032abc Mon Sep 17 00:00:00 2001 From: awesomeuser Date: Fri, 4 Aug 2023 15:37:34 +0000 Subject: [PATCH] linereader --- index.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index dac0dd3..58b215b 100644 --- a/index.php +++ b/index.php @@ -147,7 +147,7 @@ } -

Farp highlights

+ @@ -179,12 +179,17 @@ fclose($myfile); } + // // show content - $myfile = fopen("posts.txt", "r") or die("Unable to open file!"); - echo fread($myfile, filesize("posts.txt")); - fclose($myfile); - ?> + $myfile = fopen("inputfile.txt", "r") or die("Unable to open file!"); + if ($myfile) { + while (($line = fgets($myfile)) !== false) { + echo $line; + } + fclose($myfile); + } + ?>