image-bits
This commit is contained in:
parent
de3097f988
commit
2a7f0882f1
1 changed files with 2 additions and 2 deletions
4
farp.php
4
farp.php
|
@ -7,7 +7,7 @@
|
|||
|
||||
<?php
|
||||
// write new post to file only if necessary
|
||||
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
|
||||
if (!is_null($_POST["image-bits"]) && strlen($_POST["image-bits"]) != 0) {
|
||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||
$content = fread($myfile, filesize("posts.txt"));
|
||||
fclose($myfile);
|
||||
|
@ -17,7 +17,7 @@
|
|||
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
|
||||
$signature = htmlspecialchars($_POST["signature"]);
|
||||
}
|
||||
$content = "<div class='post'><h2>" . $signature . "</h2><i>UTC " . date("Y/m/d H:i") . "</i><div>" . htmlspecialchars($_POST["body"]) . "</div></div>" . $content;
|
||||
$content = $signature . "<br>UTC " . date("Y/m/d H:i") . "<br>" . htmlspecialchars($_POST["image-bits"]) . "<br>" . $content;
|
||||
|
||||
// write string back into the file
|
||||
$myfile = fopen("posts.txt", "w") or die("Unable to open file!");
|
||||
|
|
Reference in a new issue