Update index.php
This commit is contained in:
parent
04056f9184
commit
dec65f62ad
1 changed files with 2 additions and 2 deletions
|
@ -39,12 +39,12 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// write to file
|
// write to file
|
||||||
$myfile = fopen("posts.txt", "a") or die("Unable to open file!");
|
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
|
||||||
fwrite($myfile, $_POST["signature"] . ": " . $_POST["body"] . "<br>");
|
fwrite($myfile, $_POST["signature"] . ": " . $_POST["body"] . "<br>");
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
|
|
||||||
// read from file
|
// read from file
|
||||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
$myfile = fopen("posts.txt", "r") or die("Unable to open file! (r)");
|
||||||
echo fread($myfile,filesize("posts.txt"));
|
echo fread($myfile,filesize("posts.txt"));
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
?>
|
?>
|
||||||
|
|
Reference in a new issue