Update farp.php
This commit is contained in:
parent
67f13ba616
commit
6adacf933f
1 changed files with 2 additions and 2 deletions
4
farp.php
4
farp.php
|
@ -8,7 +8,7 @@
|
|||
<?php
|
||||
// write new post to file only if necessary
|
||||
if (!is_null($_POST["image-bits"]) && strlen($_POST["image-bits"]) != 0) {
|
||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||
$myfile = fopen("posts.txt", "r") or die("Unable to read file!");
|
||||
$content = fread($myfile, filesize("posts.txt"));
|
||||
fclose($myfile);
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
$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!");
|
||||
$myfile = fopen("posts.txt", "w") or die("Unable to write file!");
|
||||
fwrite($myfile, $content);
|
||||
fclose($myfile);
|
||||
} else {
|
||||
|
|
Reference in a new issue