From 5e83262034b464f8cbb4d1de0482907e39debf8e Mon Sep 17 00:00:00 2001 From: awesomeuser Date: Tue, 1 Aug 2023 23:52:48 +0000 Subject: [PATCH] just assemble content in file --- index.php | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/index.php b/index.php index bcf2c5d..975ab9e 100644 --- a/index.php +++ b/index.php @@ -70,44 +70,32 @@ -
-

anon

- mm/dd/yyyy
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dignissim sapien ut ornare elementum. Nullam vel accumsan quam. Nam vitae nibh nibh. Sed ultrices vulputate odio in volutpat. Nullam elementum tellus vel purus aliquam egestas. Cras congue diam sit amet sapien faucibus ultricies. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus sit amet arcu vitae nulla tempus blandit ac quis nibh. Mauris vel metus vel lorem venenatis facilisis mattis vel dui. Ut est purus, ultricies blandit justo tempor, porttitor porttitor erat. Praesent non felis ultricies, scelerisque dui nec, egestas lectus. Suspendisse euismod ultricies pharetra. Aenean aliquam mauris sit amet arcu scelerisque, a sollicitudin ipsum laoreet. Praesent a venenatis velit, nec fringilla mi. Nunc dignissim tortor vel odio pulvinar, vitae euismod diam tincidunt. In ullamcorper urna nec ex dapibus luctus.
UTC " . date("m/d/Y H:i") . "
" . htmlspecialchars($_POST["body"]) . "
" . $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); } - // read and show content - $myfile = fopen("posts.txt", "r") or die("Unable to open file!"); - while(!feof($myfile)) { - echo fgets($myfile) . "
"; - } - fclose($myfile); + // show content + echo $content; ?>