Update index.php

This commit is contained in:
awesomeuser 2023-08-04 16:22:21 +00:00
parent 459cdeb4f9
commit a26be8b276

View file

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