optimize
This commit is contained in:
parent
6df58cb06c
commit
f50b2817e3
1 changed files with 5 additions and 5 deletions
10
farp.php
10
farp.php
|
@ -4,12 +4,12 @@
|
||||||
<body onload="window.location.href = 'https://furp.colean.cc';">
|
<body onload="window.location.href = 'https://furp.colean.cc';">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
// write new post to file only if necessary
|
||||||
$content = fread($myfile, filesize("posts.txt"));
|
|
||||||
fclose($myfile);
|
|
||||||
|
|
||||||
// write new post to file if necessary
|
|
||||||
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
|
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
|
||||||
|
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||||
|
$content = fread($myfile, filesize("posts.txt"));
|
||||||
|
fclose($myfile);
|
||||||
|
|
||||||
// concatenate new post to the beginning of the string
|
// concatenate new post to the beginning of the string
|
||||||
$signature = "anonymous";
|
$signature = "anonymous";
|
||||||
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
|
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
|
||||||
|
|
Reference in a new issue