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
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
echo fread($myfile,filesize("posts.txt"));
fclose($myfile);
// $myfile = fopen("posts.txt", "r") or die("Unable to open file!");
// if ($myfile) {
// while (($line = fgets($myfile)) !== false) {
// echo $line;
// }
if ($myfile) {
while (($line = fgets($myfile)) !== false) {
echo $line;
}
// fclose($myfile);
// }
fclose($myfile);
}
?>
</div>