Update index.php

This commit is contained in:
awesomeuser 2023-08-02 22:10:05 +00:00
parent ffaa766ff0
commit a3ca3ef875

View file

@ -108,9 +108,9 @@
<div class="post" id="refresh" onclick="window.location.href = 'index.php'">refresh feed</div>
<?php
// // make sure the file, well, exists
// $myfile = fopen("posts.txt", "a");
// fclose($myfile);
// ensure the file exists before attempting to read from it
$myfile = fopen("posts.txt", "a");
fclose($myfile);
// show content
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");