From 4f875a2561f4b1e2c534821bedd8c271e846759c Mon Sep 17 00:00:00 2001 From: awesomeuser Date: Tue, 1 Aug 2023 23:48:04 +0000 Subject: [PATCH] break time --- index.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index 1a54c08..bcf2c5d 100644 --- a/index.php +++ b/index.php @@ -77,28 +77,37 @@ " . $content; + $content = $signature . "
UTC " . date("m/d/Y H:i") . "
" . htmlspecialchars($_POST["body"]) . "
" . $content; // write string back into the file $myfile = fopen("posts.txt", "w") or die("Unable to open file!"); fwrite($myfile, $content); fclose($myfile); + + // update size with new change + $size = strlen($content); } - // show content - echo $content; + // read and show content + $myfile = fopen("posts.txt", "r") or die("Unable to open file!"); + while(!feof($myfile)) { + echo fgets($myfile) . "
"; + } + fclose($myfile); ?>