diff --git a/index.php b/index.php index 296efc7..31c517e 100644 --- a/index.php +++ b/index.php @@ -54,27 +54,6 @@ color: grey; } - - " . $construct; - - // write back into the file - $myfile = fopen("posts.txt", "w") or die("Unable to open file!"); - fwrite($myfile, $construct); - fclose($myfile); - } - ?> @@ -98,8 +77,26 @@ " . $construct; + + // write back into the file + $myfile = fopen("posts.txt", "w") or die("Unable to open file!"); + fwrite($myfile, $construct); + fclose($myfile); + } + // read from file - sleep(3); $myfile = fopen("posts.txt", "r") or die("Unable to open file!"); echo fread($myfile,filesize("posts.txt")); fclose($myfile);